From f3919823fbb5bc34bf1cf43dfc53a59dd1e7e75f Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sun, 12 Jan 2020 00:43:27 +0100 Subject: [PATCH] Moved zipped imports test files --- .../zipped_imports/not_pkg.zip | Bin .../zipped_imports/pkg.zip | Bin test/test_inference/test_imports.py | 6 ++---- 3 files changed, 2 insertions(+), 4 deletions(-) rename test/{test_inference => examples}/zipped_imports/not_pkg.zip (100%) rename test/{test_inference => examples}/zipped_imports/pkg.zip (100%) diff --git a/test/test_inference/zipped_imports/not_pkg.zip b/test/examples/zipped_imports/not_pkg.zip similarity index 100% rename from test/test_inference/zipped_imports/not_pkg.zip rename to test/examples/zipped_imports/not_pkg.zip diff --git a/test/test_inference/zipped_imports/pkg.zip b/test/examples/zipped_imports/pkg.zip similarity index 100% rename from test/test_inference/zipped_imports/pkg.zip rename to test/examples/zipped_imports/pkg.zip diff --git a/test/test_inference/test_imports.py b/test/test_inference/test_imports.py index 78af4973..4859e6ce 100644 --- a/test/test_inference/test_imports.py +++ b/test/test_inference/test_imports.py @@ -38,9 +38,7 @@ def test_find_module_not_package(): assert is_package is False -pkg_zip_path = os.path.join(os.path.dirname(__file__), - 'zipped_imports', - 'pkg.zip') +pkg_zip_path = get_example_dir('zipped_imports', 'pkg.zip') def test_find_module_package_zipped(Script, inference_state, environment): @@ -97,7 +95,7 @@ def test_correct_zip_package_behavior(Script, inference_state, environment, code def test_find_module_not_package_zipped(Script, inference_state, environment): - path = os.path.join(os.path.dirname(__file__), 'zipped_imports/not_pkg.zip') + path = get_example_dir('zipped_imports', 'not_pkg.zip') sys_path = environment.get_sys_path() + [path] script = Script('import not_pkg; not_pkg.val', sys_path=sys_path) assert len(script.complete()) == 1