Check if string_names is None before returning string_names (#1708)

* Check if string is None before using string_names

* Add test asserting None string_names returns an empty list

* Remove whitespace to pass flake8

* Add name to authors.txt

Co-authored-by: Leo Ryu <leo@episci.com>
This commit is contained in:
Leo Ryu
2020-12-12 03:13:31 -08:00
committed by GitHub
parent 42a759a7ae
commit fd435a7bbb
3 changed files with 7 additions and 0 deletions

View File

@@ -96,6 +96,9 @@ def test_correct_zip_package_behavior(Script, inference_state, environment, code
if path is not None:
assert value.py__path__() == [str(pkg_zip_path.joinpath(path))]
value.string_names = None
assert value.py__package__() == []
def test_find_module_not_package_zipped(Script, inference_state, environment):
path = get_example_dir('zipped_imports', 'not_pkg.zip')