From 8c96b65082b469b3bc8f1c6f8618924b002b22df Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 18 Mar 2019 02:27:53 +0100 Subject: [PATCH] Fix bench/bench.py without args MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: ) --- bench/bench.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bench/bench.py b/bench/bench.py index 4e72444e7..31cc7ac13 100644 --- a/bench/bench.py +++ b/bench/bench.py @@ -5,7 +5,7 @@ if __name__ == "__main__": import pytest # NOQA import pstats - script = sys.argv[1:] if len(sys.argv) > 1 else "empty.py" + script = sys.argv[1:] if len(sys.argv) > 1 else ["empty.py"] stats = cProfile.run("pytest.cmdline.main(%r)" % script, "prof") p = pstats.Stats("prof") p.strip_dirs()