ronaldoussoren / modulegraph

modulegraph determines a dependency graph between Python modules primarily by bytecode analysis for import statements. modulegraph uses similar methods to modulefinder from the standard library, but uses a more flexible internal representation, has more extensive knowledge of special cases, and is extensible.
MIT No Attribution
38 stars 4 forks source link

sdist setup.py test fails in test_find_module: ImportError: mymodule2 #47

Open ronaldoussoren opened 5 years ago

ronaldoussoren commented 5 years ago

Original report by John Vandenberg (Bitbucket: [John Vandenberg](https://bitbucket.org/John Vandenberg), ).


Using 0.17 sdist as part of packaging at https://build.opensuse.org/package/show/home:jayvdb:py-new/python-modulegraph, both Python 2.7 and Python 3.7 fail running setup.py test

running test
...
running build_ext
...........................s..............................s.s.s.s..........E..........xxxx..xx.xx....xx......

ERROR: test_find_module (modulegraph_tests.test_modulegraph.TestFunctions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/abuild/rpmbuild/BUILD/modulegraph-0.17/modulegraph_tests/test_modulegraph.py", line 203, in test_find_module
    info = modulegraph.find_module('mymodule2', path=[path] + sys.path)
  File "/home/abuild/rpmbuild/BUILD/modulegraph-0.17/modulegraph/modulegraph.py", line 347, in find_module
    raise ImportError(name)
ImportError: mymodule2
ronaldoussoren commented 5 years ago

Original comment by John Vandenberg (Bitbucket: [John Vandenberg](https://bitbucket.org/John Vandenberg), ).


As issues are disabled on modulegraph2 repo, apologies in advance for adding a quick note here that a lot of tests failed when modulegraph2 tests were run in a RPM VM isolated from the internet. I needed to run nose -e '(TestVirtualEnv|test_six_support|TestPackageFinder|test_distribution|test_all_distributions|test_graph_in_virtual_env|test_graph_distribution|test_dot_graph|test_html_graph|test_report_with_distribution|no_test_stdlib_script)' to get the tests to pass. packaging at https://build.opensuse.org/package/show/home:jayvdb:py-new/python-modulegraph2