Skip to content

Commit ad5bdbf

Browse files
committed
tests: Remove t-strings test in coverage.c.
Signed-off-by: Koudai Aono <koxudaxi@gmail.com>
1 parent eb44912 commit ad5bdbf

File tree

2 files changed

+3
-34
lines changed

2 files changed

+3
-34
lines changed

ports/unix/coverage.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
#include "py/stream.h"
2020
#include "py/binary.h"
2121
#include "py/bc.h"
22-
#include "py/lexer.h"
23-
#include "py/parse.h"
24-
#include "py/compile.h"
25-
#include "py/misc.h"
2622

2723
// expected output of this file is found in extra_coverage.py.exp
2824

@@ -200,7 +196,6 @@ static void coverage_sched_function(mp_sched_node_t *node) {
200196
}
201197
}
202198

203-
204199
// function to run extra tests for things that can't be checked by scripts
205200
static mp_obj_t extra_coverage(void) {
206201
// mp_printf (used by ports that don't have a native printf)
@@ -907,30 +902,6 @@ static mp_obj_t extra_coverage(void) {
907902
MICROPY_STACK_CHECK == 0 || old_stack_limit == new_stack_limit);
908903
}
909904

910-
{
911-
mp_printf(&mp_plat_print, "# objstr subscript assignment\n");
912-
913-
mp_obj_t bytes_obj = mp_obj_new_bytes((const byte *)"hello", 5);
914-
const mp_obj_type_t *type = mp_obj_get_type(bytes_obj);
915-
if (MP_OBJ_TYPE_HAS_SLOT(type, subscr)) {
916-
mp_obj_t result = MP_OBJ_TYPE_GET_SLOT(type, subscr)(bytes_obj, MP_OBJ_NEW_SMALL_INT(0), MP_OBJ_NEW_SMALL_INT(120));
917-
if (result == MP_OBJ_NULL) {
918-
mp_printf(&mp_plat_print, "Bytes subscript assignment not supported\n");
919-
}
920-
}
921-
922-
#if !MICROPY_PY_BUILTINS_STR_UNICODE
923-
mp_obj_t str_obj = mp_obj_new_str_from_cstr("hello");
924-
type = mp_obj_get_type(str_obj);
925-
if (MP_OBJ_TYPE_HAS_SLOT(type, subscr)) {
926-
mp_obj_t result = MP_OBJ_TYPE_GET_SLOT(type, subscr)(str_obj, MP_OBJ_NEW_SMALL_INT(0), MP_OBJ_NEW_QSTR(MP_QSTR_a));
927-
if (result == MP_OBJ_NULL) {
928-
mp_printf(&mp_plat_print, "String subscript assignment not supported\n");
929-
}
930-
}
931-
#endif
932-
}
933-
934905
mp_printf(&mp_plat_print, "# end coverage.c\n");
935906

936907
mp_obj_streamtest_t *s = mp_obj_malloc(mp_obj_streamtest_t, &mp_type_stest_fileio);

tests/ports/unix/extra_coverage.py.exp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ example_package ffi framebuf
7373
gc hashlib heapq io
7474
json machine marshal math
7575
os platform random re
76-
select socket string struct
77-
sys termios time tls
78-
uctypes vfs websocket
76+
select socket struct sys
77+
termios time tls uctypes
78+
vfs websocket
7979
me
8080

8181
micropython machine marshal math
@@ -206,8 +206,6 @@ pop all: 1 2 4 5
206206
1 1
207207
# stackctrl
208208
1 1
209-
# objstr subscript assignment
210-
Bytes subscript assignment not supported
211209
# end coverage.c
212210
0123456789 b'0123456789'
213211
7300

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy