Skip to content

Commit 9fa06d0

Browse files
committed
Use posargs as a substitute
1 parent 053dcad commit 9fa06d0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

noxfile.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,13 @@ def test(session, sqlalchemy):
119119
with_coverage = False
120120
else:
121121
with_coverage = True
122-
pytest_cmd = [
123-
"pytest", "--pyargs", "sqlalchemy_mptt",
124-
"--cov", "sqlalchemy_mptt", "--cov-report", "term-missing:skip-covered",
125-
"-W", "error:::sqlalchemy_mptt"
126-
] + (["--cov-report", "xml"] if with_coverage else []) + session.posargs
122+
pytest_cmd = ["pytest"] + (
123+
session.posargs or [
124+
"--pyargs", "sqlalchemy_mptt",
125+
"--cov", "sqlalchemy_mptt", "--cov-report", "term-missing:skip-covered",
126+
"-W", "error:::sqlalchemy_mptt"
127+
]
128+
) + (["--cov-report", "xml"] if with_coverage else [])
127129
session.run(*pytest_cmd)
128130

129131

0 commit comments

Comments
 (0)