New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing test #2

sanjayankur31 opened this Issue Nov 8, 2018 · 2 comments


None yet
2 participants
Copy link

sanjayankur31 commented Nov 8, 2018

While petlink builds cleanly, I can't get the test to pass. I tried in a clean virtual environment also, and it still failed:

$ python test
running test
running egg_info
writing petlink.egg-info/PKG-INFO
writing dependency_links to petlink.egg-info/dependency_links.txt
writing requirements to petlink.egg-info/requires.txt
writing top-level names to petlink.egg-info/top_level.txt
reading manifest file 'petlink.egg-info/SOURCES.txt'
reading manifest template ''
writing manifest file 'petlink.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-x86_64-3.7/petlink/ -> petlink
test_all (unittest.loader._FailedTest) ... ERROR

ERROR: test_all (unittest.loader._FailedTest)
ImportError: Failed to import test module: test_all
Traceback (most recent call last):
  File "/usr/lib64/python3.7/unittest/", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/home/asinha/rpmbuild/SOURCES/petlink-0.3.2/petlink/tests/", line 9, in <module>
    from .. import petlink
  File "/home/asinha/rpmbuild/SOURCES/petlink-0.3.2/petlink/", line 11, in <module>
    from simplewrap import *
  File "/home/asinha/dump/petlink-virt/lib64/python3.7/site-packages/simplewrap/", line 7, in <module>
    from c_python import *
ModuleNotFoundError: No module named 'c_python'

Ran 1 test in 0.000s

FAILED (errors=1)
Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>

These are the installed bits:


I see that simple wrap in the Github repo is version 0.3.1 even though the Pypi version is 0.3.0. Would that be the issue here?

Thanks again for the help.


This comment has been minimized.

Copy link

spedemon commented Nov 9, 2018

I have updated simplewrap. It is now compatible with Python3.
When petlink is built, compiles the C code into a dynamic library. Simplewrap then finds the library when you import petlink. This fails at testing. In order to make the tests work, the dynamic library needs to be copied in the test location. This works for me (test pass):

python build install
python build_ext --inplace

I have included these instructions in the README.

If this does not work for integration in Fedora, I can work on finding a mechanism to find the library during tests.

Thank you again.


This comment has been minimized.

Copy link

sanjayankur31 commented Nov 9, 2018

The new version of simplewrap fixes it. The Fedora build installs the library and other files to the standard python site-package locations, so simplewrap finds them correctly. I've updated simplewrap in Fedora, and I expect I'll have petlink reviewed and added in a few days too.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment