Skip to content

Commit 8c96b65

Browse files
committed
Fix bench/bench.py without args
Fixes: > File "…/Vcs/pytest/src/_pytest/config/__init__.py", line 60, in main > config = _prepareconfig(args, plugins) > File "…/Vcs/pytest/src/_pytest/config/__init__.py", line 179, in _prepareconfig > raise TypeError(msg.format(args, type(args))) > TypeError: `args` parameter expected to be a list or tuple of strings, got: 'empty.py' (type: <class 'str'>)
1 parent c926999 commit 8c96b65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bench/bench.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest # NOQA
66
import pstats
77

8-
script = sys.argv[1:] if len(sys.argv) > 1 else "empty.py"
8+
script = sys.argv[1:] if len(sys.argv) > 1 else ["empty.py"]
99
stats = cProfile.run("pytest.cmdline.main(%r)" % script, "prof")
1010
p = pstats.Stats("prof")
1111
p.strip_dirs()

0 commit comments

Comments
 (0)