From ea050d5fd8cf4925313db224056d6eb4e7786cbc Mon Sep 17 00:00:00 2001 From: Rishi Gupta Date: Thu, 6 Oct 2016 22:07:02 -0700 Subject: [PATCH] test_runner: Fix error message for failed import. Previously, we suggested running `python -c import zerver.tests.test_mytest` when importing test_mytest failed, which doesn't work. This commit adds the missing quotes, making it `python -c 'import zerver.tests.test_mytest'` --- zerver/lib/test_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/lib/test_runner.py b/zerver/lib/test_runner.py index c944dd72ca..02cc918fbd 100644 --- a/zerver/lib/test_runner.py +++ b/zerver/lib/test_runner.py @@ -107,7 +107,7 @@ def run_test(test): print("Actual test to be run is %s, but import failed." % (actual_test_name,)) print("Importing test module directly to generate clearer traceback:") try: - command = ["python", "-c", "import %s" % (actual_test_name,)] + command = ["python", "-c", "'import %s'" % (actual_test_name,)] print("Import test command: `%s`" % (' '.join(command),)) subprocess.check_call(command) except subprocess.CalledProcessError: