We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46d6375 commit 0d3b5c9Copy full SHA for 0d3b5c9
1 file changed
tox.ini
@@ -17,6 +17,27 @@ deps =
17
sh >= 2.0.2, <3
18
click
19
commands =
20
+ python - << 'EOF'
21
+import os, shutil, sys, glob
22
+
23
+args = sys.argv[1:]
24
+if not args:
25
+ # No file or directory passed → rely on pytest auto-discovery
26
+ sys.exit(0)
27
28
+for path in args:
29
+ if os.path.isdir(path):
30
+ # Copy all .py files inside the directory
31
+ for file in glob.glob(os.path.join(path, "*.py")):
32
+ new = "test_" + os.path.basename(file)
33
+ shutil.copy(file, new)
34
+ elif os.path.isfile(path):
35
+ # Copy a single file
36
+ new = "test_" + os.path.basename(path)
37
+ shutil.copy(path, new)
38
+ else:
39
+ print(f"Warning: {path} does not exist and will be ignored.")
40
+EOF
41
pytest --cov --cov-report=term-missing {posargs}
42
43
[testenv:lint]
0 commit comments