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

Apply best practices to testing #50

Closed
engnadeau opened this issue Apr 24, 2018 · 3 comments
Closed

Apply best practices to testing #50

engnadeau opened this issue Apr 24, 2018 · 3 comments

Comments

@engnadeau
Copy link
Contributor

  • Currently, all testing is consolidated in opem/opem/test.py as a pseudo-doctest file
    • This is actually improper usage of doctests
    • It is hard to understand how and what is being tested
  • If doctests are to be used, they should be implemented in the docstrings
  • Otherwise, testing should use a proper framework
  • See http://docs.python-guide.org/en/latest/writing/tests/ for best practices
@sepandhaghighi
Copy link
Contributor

Hi @nnadeau

I used doctest.testfile method because of .coverage file merge problem in docstring mode, and we have some output style test in OPEM that I think doctest is better than pytest and unittest in this case.

Thanks

@engnadeau
Copy link
Contributor Author

Can you please provide a more detailed description of the merge problem and output style test?

@sepandhaghighi
Copy link
Contributor

@nnadeau

Merge problem : each function tests in docstring mode create one .coverage file and this file overwrite by next.

Output style test : some functions output style in console

Thanks

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

No branches or pull requests

2 participants