Skip to content

Commit 94f27f6

Browse files
update scripts and makefile
1 parent e928d1f commit 94f27f6

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: install format lint test clean redis-start redis-stop check-types integration-test docs-build docs-serve check
1+
.PHONY: install format lint test test-all clean redis-start redis-stop check-types docs-build docs-serve check
22

33
install:
44
poetry install --all-extras

scripts.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import subprocess
2+
import sys
23

34

45
def format():
@@ -29,13 +30,23 @@ def check_mypy():
2930

3031

3132
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)
3340

3441

3542
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)
3950

4051

4152
def test_notebooks():

0 commit comments

Comments
 (0)