summaryrefslogtreecommitdiff
path: root/tests/run-tests-exp.py
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2020-03-22 21:26:08 -0500
committerDamien George <damien.p.george@gmail.com>2020-03-30 13:21:58 +1100
commit3dc324d3f1312e40d3a8ed87e7244966bb756f26 (patch)
tree94ff44f8eabba0039582c245b901173597edd11e /tests/run-tests-exp.py
parent488613bca6c460340ed2995ae5cafafe22d0bfff (diff)
tests: Format all Python code with black, except tests in basics subdir.
This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting.
Diffstat (limited to 'tests/run-tests-exp.py')
-rw-r--r--tests/run-tests-exp.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/run-tests-exp.py b/tests/run-tests-exp.py
index 3af8feae7..34c6f650f 100644
--- a/tests/run-tests-exp.py
+++ b/tests/run-tests-exp.py
@@ -9,12 +9,9 @@ import sys
import uos as os
-tests = [
- "basics", "micropython", "float", "import", "io",
- " misc", "unicode", "extmod", "unix"
-]
+tests = ["basics", "micropython", "float", "import", "io", " misc", "unicode", "extmod", "unix"]
-if sys.platform == 'win32':
+if sys.platform == "win32":
MICROPYTHON = "micropython.exe"
else:
MICROPYTHON = "micropython"
@@ -26,13 +23,14 @@ def should_skip(test):
if test.startswith("viper"):
return True
+
test_count = 0
passed_count = 0
skip_count = 0
for suite in tests:
- #print("Running in: %s" % suite)
- if sys.platform == 'win32':
+ # print("Running in: %s" % suite)
+ if sys.platform == "win32":
# dir /b prints only contained filenames, one on a line
# http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/dir.mspx
r = os.system("dir /b %s/*.py >tests.lst" % suite)
@@ -44,7 +42,7 @@ for suite in tests:
testcases = f.readlines()
testcases = [l[:-1] for l in testcases]
assert testcases, "No tests found in dir '%s', which is implausible" % suite
- #print(testcases)
+ # print(testcases)
for t in testcases:
if t == "native_check.py":
continue
@@ -65,7 +63,7 @@ for suite in tests:
pass
if exp is not None:
- #print("run " + qtest)
+ # print("run " + qtest)
r = os.system(MICROPYTHON + " %s >.tst.out" % qtest)
if r == 0:
f = open(".tst.out")