datatogether/archivertools

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

Opened this issue · 2 comments

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

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)

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.