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

Rewrite a python test module to use pytest style #2794

Closed
gsidebo opened this issue Mar 6, 2017 · 1 comment · Fixed by #3332
Closed

Rewrite a python test module to use pytest style #2794

gsidebo opened this issue Mar 6, 2017 · 1 comment · Fixed by #3332
Assignees

Comments

@gsidebo
Copy link
Contributor

gsidebo commented Mar 6, 2017

After our lunch & learn in late February, we determined that a good way to begin using pytest-style testing in our Python suite would be to pick a test module that would (a) see a significant benefit from the rewrite, and (b) wouldn't be overwhelmingly difficult. One suggestion was the test modules in the grades app, where there is very heavy and repetitive patching.

Once a module is chosen, this issue should be updated

@gsidebo gsidebo changed the title Rewrite a python test file to use pytest style Rewrite a python test module to use pytest style Mar 6, 2017
@rhysyngsun
Copy link
Contributor

ESTestCase is going to be a major blocker on refactoring our tests to pytest, so we should implement that behavior for pytest via fixtures and find a small module to refactor and use to verify.

Looks like search/permissions_test.py is a good target:

grep -rwl **/*.py /dev/null -e 'ESTestCase' | xargs wc -l
  341 search/api_test.py
   75 search/base.py
  631 search/indexing_api_test.py
   47 search/permissions_test.py
  268 search/views_test.py
 1362 total

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

Successfully merging a pull request may close this issue.

2 participants