0

I'm trying learn TDD in python. Unfortunately I have not found any PEPs about unittest.

  1. Does one subclass of unittest.TestCase should contain all tests about one tested function?
  2. What are the recommendations for naming classes, methods or test-files?
1
  • 1
    The documentation has a bit about that. And I guess the source has some good example for unittests. Commented Jan 6, 2013 at 19:33

1 Answer 1

1

I usually make one class that handles the setup and tearing down for a particular test topic and subclass it for every single test. That is, one class for every test, with a name that conveys what is being tested. Nothing fancy.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.