Skip to content
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

Implement PyTest Framework (#2) #5

Closed
wants to merge 6 commits into from
Closed

Implement PyTest Framework (#2) #5

wants to merge 6 commits into from

Conversation

eric-tramel
Copy link
Member

This is the merge for changing from Nose over to PyTest (see Issue #2). I'm interested to see what everyone's thoughts are. I think that Sundeep already gives it a 👍 .

@sdrangan
Copy link
Member

sdrangan commented Mar 2, 2017

Eric, How do you run the tests?

When I go to run an individual test, it can't find the vampyre package: For example, I cd to:

vampyre\test\test_common

Then, I run

python test_utils.py

Then, I get the error:

Traceback (most recent call last):
File "test_utils.py", line 5, in
from vampyre.common.utils import repeat_axes
ImportError: No module named 'vampyre'

@amanoel
Copy link

amanoel commented Mar 2, 2017

I don't know what kind of setup you guys are using, are you adding the package to the PYTHONPATH or reinstalling it everytime?

I was getting the same error, then I've done
python setup.py install --user

Now I have the package installed... But, when __init__.py is called, I get an error on the imports

ModuleNotFoundError: No module named 'vampyre.common'

And that's because, afaik, the submodules also need to be specified in the setup.py. Alternatively one can import find_packages from setuptools and replace the packages entry by

packages = find_packages()

Then the tests work fine.

@sdrangan
Copy link
Member

sdrangan commented Sep 8, 2017

I already implemented these changes separately before I understood how to do pull requests

@sdrangan sdrangan closed this Sep 8, 2017
@sdrangan sdrangan deleted the pytest branch September 8, 2017 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants