Skip to content

Using py.test instead of nose #189

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

Merged
merged 1 commit into from
Aug 18, 2015

Conversation

ocefpaf
Copy link
Member

@ocefpaf ocefpaf commented Aug 17, 2015

First step to close #173

@BibMartin or @themiurgo please... 😸

@BibMartin
Copy link
Contributor

Wow ! This looks good (and big amount of work).
Globally I'm okay. But I'm much too ignorant about travis to be confident for merge.

@ocefpaf
Copy link
Member Author

ocefpaf commented Aug 18, 2015

So lets break it into pieces to make it easier to discuss.

  • We had 30 tests and the are all passing in the new framework 🎉
  • I removed the Jinja2 version constraint ==2.7.2 so we can test with the latest version and avoid surprises.
  • We no longer support distutils. setuptools is a requirement now.
  • Inside travis.yml and setup.py I am reading the requirements from requirements.txt. In the future I want to have requirements-extras.txt (with: pandas, vincent, geopandas, etc), and requirements-dev.txt (the testing stuff: mock and pytest). That way we will have only one 3 places to look for the dependencies instead of writing them on .travis.yml, setup.py, and the req files.
  • I cleanup setup.py a little bit and added the test class (so we can run python setup.py test)
  • nose is gone! I tweaked the tests to have the same prefix (test_something.py) and changed the classes names so pytest can discover them. The data path is now absolute, so we can run the tests from any directory.

In the future I want to break the current tests into their own files (teat_line.py, test_marker.py, etc). I know it sounds like an overkill, but I want to beef up the tests a lot to avoid regressions, and with the monolithic file we have it will be a nightmare.

@BibMartin
Copy link
Contributor

@ocefpaf Thanks for explainations.

I was a bit frightened by my ignorance on travis ; but the tests pass and we don't ask more in this PR.

BibMartin added a commit that referenced this pull request Aug 18, 2015
Using py.test instead of nose
@BibMartin BibMartin merged commit fa9b88d into python-visualization:master Aug 18, 2015
@ocefpaf ocefpaf deleted the refactor_tests branch August 18, 2015 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RE-factor the tests
2 participants