summaryrefslogtreecommitdiff
path: root/tests/extmod
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extmod')
-rw-r--r--tests/extmod/uctypes_array_assign_le.py1
-rw-r--r--tests/extmod/uctypes_byteat.py4
-rw-r--r--tests/extmod/uctypes_error.py10
-rw-r--r--tests/extmod/ujson_dump_iobase.py2
-rw-r--r--tests/extmod/ure_sub.py6
5 files changed, 11 insertions, 12 deletions
diff --git a/tests/extmod/uctypes_array_assign_le.py b/tests/extmod/uctypes_array_assign_le.py
index 6afa7e0a2..37c52388d 100644
--- a/tests/extmod/uctypes_array_assign_le.py
+++ b/tests/extmod/uctypes_array_assign_le.py
@@ -55,4 +55,3 @@ assert hex(S.arr6[0]) == "0xaabbccdd"
print(S.arr6[0] == S.arr8[0].l)
assert S.arr6[0] == S.arr8[0].l
-
diff --git a/tests/extmod/uctypes_byteat.py b/tests/extmod/uctypes_byteat.py
index ab2535db8..784209f80 100644
--- a/tests/extmod/uctypes_byteat.py
+++ b/tests/extmod/uctypes_byteat.py
@@ -6,5 +6,5 @@ except ImportError:
data = bytearray(b'01234567')
-print(uctypes.bytes_at(uctypes.addressof(data), 4))
-print(uctypes.bytearray_at(uctypes.addressof(data), 4))
+print(uctypes.bytes_at(uctypes.addressof(data), 4))
+print(uctypes.bytearray_at(uctypes.addressof(data), 4))
diff --git a/tests/extmod/uctypes_error.py b/tests/extmod/uctypes_error.py
index 95ba0fad4..2500e2927 100644
--- a/tests/extmod/uctypes_error.py
+++ b/tests/extmod/uctypes_error.py
@@ -9,29 +9,29 @@ except ImportError:
data = bytearray(b"01234567")
# del subscr not supported
-S = uctypes.struct(uctypes.addressof(data), {})
+S = uctypes.struct(uctypes.addressof(data), {})
try:
del S[0]
except TypeError:
print('TypeError')
# list is an invalid descriptor
-S = uctypes.struct(uctypes.addressof(data), [])
+S = uctypes.struct(uctypes.addressof(data), [])
try:
- S.x
+ S.x
except TypeError:
print('TypeError')
# can't access attribute with invalid descriptor
S = uctypes.struct(uctypes.addressof(data), {'x':[]})
try:
- S.x
+ S.x
except TypeError:
print('TypeError')
# can't assign to aggregate
S = uctypes.struct(uctypes.addressof(data), {'x':(uctypes.ARRAY | 0, uctypes.INT8 | 2)})
try:
- S.x = 1
+ S.x = 1
except TypeError:
print('TypeError')
diff --git a/tests/extmod/ujson_dump_iobase.py b/tests/extmod/ujson_dump_iobase.py
index d30d1b561..6280fb11b 100644
--- a/tests/extmod/ujson_dump_iobase.py
+++ b/tests/extmod/ujson_dump_iobase.py
@@ -28,5 +28,5 @@ class S(io.IOBase):
# dump to the user stream
s = S()
-json.dump([123, {}], s)
+json.dump([123, {}], s)
print(s.buf)
diff --git a/tests/extmod/ure_sub.py b/tests/extmod/ure_sub.py
index 4aeb8650a..f5a19af8d 100644
--- a/tests/extmod/ure_sub.py
+++ b/tests/extmod/ure_sub.py
@@ -27,11 +27,11 @@ print(re.sub('a', A(), 'aBCBABCDabcda.'))
print(
re.sub(
- r'def\s+([a-zA-Z_][a-zA-Z_0-9]*)\s*\(\s*\):',
- 'static PyObject*\npy_\\1(void){\n return;\n}\n',
+ r'def\s+([a-zA-Z_][a-zA-Z_0-9]*)\s*\(\s*\):',
+ 'static PyObject*\npy_\\1(void){\n return;\n}\n',
'\n\ndef myfunc():\n\ndef myfunc1():\n\ndef myfunc2():'
)
-)
+)
print(
re.compile(