Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Specify testing conventions and create a reference example test class in the testing file #20

Open
jeffreyliu opened this issue Oct 27, 2017 · 2 comments

Comments

@jeffreyliu
Copy link
Collaborator

jeffreyliu commented Oct 27, 2017

Specify in README and/or CONTRIBUTING the conventions that tests should follow and create an example test class within tests.py for reference that specifies and implements the conventions.

To get us started:
Conventions:

  • Each test should only test one thing
  • Similar tests should be grouped in the same class
  • Tests should specify clearly in the docstring what's being tested, and what the failure conditions are
  • There should be tests that cover both:
    • expected behavior returning successfully
    • unexpected behavior failing gracefully
  • There should be tests that cover both:
    • unit tests of individual functions and classes
    • system tests of example workflows

I'd welcome any feedback about any additions/changes to conventions, and also thoughts about where it should live, esp @weatherpattern @ebenp

python unittest library docs for reference:
python3: https://docs.python.org/3/library/unittest.html
python2: https://docs.python.org/2/library/unittest.html

@jeffreyliu jeffreyliu changed the title Create default testing template for abstract tests Create default testing template for general tests Oct 27, 2017
@dcwalk
Copy link
Member

dcwalk commented Nov 2, 2017

Could we describe this issue a little more fully @jeffreyliu ? I'm not entirely sure what the ask is
(aka -- what does the default template have to require on a first iteration)

@jeffreyliu
Copy link
Collaborator Author

yup! I'll update the top level comment with the details. I unfortunately didn't get around to fleshing out the ask when I made it.

@jeffreyliu jeffreyliu changed the title Create default testing template for general tests Specify testing conventions and create a reference example test class in the testing file Nov 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants