diff options
author | Ross Barnowski <rossbar@berkeley.edu> | 2021-05-31 07:52:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-31 05:52:04 -0700 |
commit | 37aaa2858ce1d06a2a5df3adbbba88bda828bfc5 (patch) | |
tree | ee12d0c9522000fb8d7e74ef9be1458ed2a02f1b /networkx/tests/test_import.py | |
parent | 7afb9006f3650e0746b41d44863b42fe28a224ab (diff) | |
download | networkx-37aaa2858ce1d06a2a5df3adbbba88bda828bfc5.tar.gz |
Remove "networkx" from top-level networkx namespace (#4840)
* Add a test to catch importing aliases.
* Add test for another bad import pattern.
* Fix one bad import pattern.
Adds __all__ to some modules where it was missing.
* use `from ... import` in all __init__ imports
Co-authored-by: Dan Schult <dschult@colgate.edu>
Diffstat (limited to 'networkx/tests/test_import.py')
-rw-r--r-- | networkx/tests/test_import.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/networkx/tests/test_import.py b/networkx/tests/test_import.py index 6563439b..32aafdf2 100644 --- a/networkx/tests/test_import.py +++ b/networkx/tests/test_import.py @@ -4,3 +4,8 @@ import pytest def test_namespace_alias(): with pytest.raises(ImportError): from networkx import nx + + +def test_namespace_nesting(): + with pytest.raises(ImportError): + from networkx import networkx |