From 301648af8f1a5aa8133bbfd7e9ccc5b0aa489ca8 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Sat, 26 Oct 2019 21:32:58 +0800 Subject: [PATCH] fix: compatibility in Python 2.7 ImportError will be raised in `from httprunner.plugins.locusts.utils import prepare_locust_tests` if httprunner/plugins/__init__.py is missed --- httprunner/plugins/__init__.py | 2 ++ tests/test_api.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 httprunner/plugins/__init__.py diff --git a/httprunner/plugins/__init__.py b/httprunner/plugins/__init__.py new file mode 100644 index 00000000..1802047f --- /dev/null +++ b/httprunner/plugins/__init__.py @@ -0,0 +1,2 @@ +# NOTICE: +# This file should not be deleted, or ImportError will be raised in Python 2.7 when importing plugin diff --git a/tests/test_api.py b/tests/test_api.py index 011d32f2..1f84a8b8 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -206,7 +206,6 @@ class TestHttpRunner(ApiServerUnittest): log_file_path = os.path.join(os.getcwd(), 'reports', "test_log_file.log") runner = HttpRunner(failfast=True, log_file=log_file_path) runner.run(self.testcase_cli_path) - time.sleep(1) self.assertTrue(os.path.isfile(log_file_path)) os.remove(log_file_path)