diff --git a/app_helper/main.py b/app_helper/main.py index b7de06c..a714eec 100644 --- a/app_helper/main.py +++ b/app_helper/main.py @@ -84,6 +84,8 @@ def _test_run_worker(test_labels, test_runner, failfast=False, runner_options=No if "PytestTestRunner" in test_runner: kwargs["pytest_args"] = runner_options else: + if not isinstance(runner_options, list): + runner_options = runner_options.split(" ") extra = _parse_runner_options(TestRunner, runner_options) extra.update(kwargs) kwargs = extra diff --git a/app_helper/server.py b/app_helper/server.py index 86bfadb..590a6c9 100644 --- a/app_helper/server.py +++ b/app_helper/server.py @@ -48,6 +48,7 @@ def _init_runserver(runserver_module, bind, port, verbose, logger=None, channels "use_static_handler": True, "use_threading": True, "verbosity": verbose, + "skip_checks": True, "use_reloader": True, }, ) diff --git a/changes/220.bugfix b/changes/220.bugfix new file mode 100644 index 0000000..7cdccf8 --- /dev/null +++ b/changes/220.bugfix @@ -0,0 +1 @@ +Fix runner-options argument on Django test runner diff --git a/tests/test_commands.py b/tests/test_commands.py index 2eb1efa..c0e4193 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -604,7 +604,7 @@ def test_testrun_runner_options(self): args["--persistent"] = True args["--runner"] = "runners.CapturedOutputRunner" args[""] = self.application - args["--runner-options"] = ["--tag=a-tag"] + args["--runner-options"] = "--tag=a-tag" core(args, self.application) self.assertTrue("Ran 1 test in" in err.getvalue()) self.assertEqual(exit_state.exception.code, 0)