mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Make is_package a function and call it consistently
This commit is contained in:
@@ -91,7 +91,7 @@ def test_correct_zip_package_behavior(Script, inference_state, environment, code
|
||||
value, = pkg._name.infer()
|
||||
assert value.py__file__() == os.path.join(pkg_zip_path, 'pkg', file)
|
||||
assert '.'.join(value.py__package__()) == package
|
||||
assert value.is_package is (path is not None)
|
||||
assert value.is_package() is (path is not None)
|
||||
if path is not None:
|
||||
assert value.py__path__() == [os.path.join(pkg_zip_path, path)]
|
||||
|
||||
@@ -343,7 +343,7 @@ def test_get_modules_containing_name(inference_state, path, goal, is_package):
|
||||
def test_load_module_from_path(inference_state, path, base_names, is_package, names):
|
||||
file_io = KnownContentFileIO(path, '')
|
||||
m = imports._load_module_from_path(inference_state, file_io, base_names)
|
||||
assert m.is_package == is_package
|
||||
assert m.is_package() == is_package
|
||||
assert m.string_names == names
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user