We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
__file__
1 parent 1561476 commit f6bab5aCopy full SHA for f6bab5a
1 file changed
tests/runtests.py
@@ -1,17 +1,18 @@
1
import glob
2
import os
3
import subprocess
4
+from pathlib import Path
5
6
# Change work dir if not in tests/
-tests_dir = os.path.dirname(__file__)
7
-if os.getcwd() != tests_dir:
+tests_dir = Path(__file__).parent.resolve()
8
+if Path.cwd() != tests_dir:
9
os.chdir(tests_dir)
10
11
tests = sorted(glob.glob("[A-Za-z]*.py"))
12
excludes = ["runtests.py"]
13
-output_dir = os.path.join(os.path.dirname(__file__), "output")
14
-if not os.path.exists(output_dir):
+output_dir = tests_dir / "output"
15
+if not output_dir.exists():
16
os.mkdir(output_dir)
17
18
for test in tests:
0 commit comments