|
1 | 1 | import subprocess |
| 2 | +import sys |
2 | 3 |
|
3 | 4 |
|
4 | 5 | def format(): |
@@ -29,13 +30,23 @@ def check_mypy(): |
29 | 30 |
|
30 | 31 |
|
31 | 32 | def test(): |
32 | | - subprocess.run(["python", "-m", "pytest", "-n", "auto", "--log-level=CRITICAL"], check=True) |
| 33 | + # Get any extra arguments passed to the script |
| 34 | + extra_args = sys.argv[1:] |
| 35 | + if not extra_args: |
| 36 | + test_cmd = ["python", "-m", "pytest", "-n", "auto", "--log-level=CRITICAL"] |
| 37 | + else: |
| 38 | + test_cmd = ["python", "-m", "pytest", "-n", "auto", "--log-level=CRITICAL"] + extra_args |
| 39 | + subprocess.run(test_cmd, check=True) |
33 | 40 |
|
34 | 41 |
|
35 | 42 | def test_verbose(): |
36 | | - subprocess.run( |
37 | | - ["python", "-m", "pytest", "-n", "auto", "-vv", "-s", "--log-level=CRITICAL"], check=True |
38 | | - ) |
| 43 | + # Get any extra arguments passed to the script |
| 44 | + extra_args = sys.argv[1:] |
| 45 | + if not extra_args: |
| 46 | + test_cmd = ["python", "-m", "pytest", "-n", "auto", "-vv", "-s", "--log-level=CRITICAL"] |
| 47 | + else: |
| 48 | + test_cmd = ["python", "-m", "pytest", "-n", "auto", "-vv", "-s", "--log-level=CRITICAL"] + extra_args |
| 49 | + subprocess.run(test_cmd, check=True) |
39 | 50 |
|
40 | 51 |
|
41 | 52 | def test_notebooks(): |
|
0 commit comments