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

Feature/change test layout #85

Merged
merged 8 commits into from
Aug 1, 2019
Merged

Feature/change test layout #85

merged 8 commits into from
Aug 1, 2019

Conversation

dmitrypolo
Copy link
Contributor

This addresses #80 .

  1. Puts all fixtures into the conftest.py file as recommended by pytest.
  2. Adds a pytest.ini file to ignore RuntimeWarning when running pytest. This comes about when running older versions of numpy and sklearn. The output of the tests remains as intended.
  3. Creates a function in impyute/util/testing.py which does the two tasks of checking the return_type and missing_value which appeared in almost every test file.
  4. Modified the tests to use these fixtures as well as other pytest best practices to make code more readable.
  5. Fixed the test_compare.py test to actually test the output of the file. Previously it wrote out a file to the repo that would remain there. Now it uses pytest fixtures to write to a temporary directory, check the contents of the file, and then delete the file so that the user does not have to have this file hanging around their system.
  6. Changed the last two remaining test files using unittest to use pytest so that testing is consistent across the whole package.

Copy link
Owner

@eltonlaw eltonlaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow this looks great! Thanks a lot!

@eltonlaw eltonlaw merged commit 45412a4 into eltonlaw:master Aug 1, 2019
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.

2 participants