We have an interview in an upcoming episode with Hypothesis author on the podcast I cohost: http://pythonpodcast.com/
Might have some python work coming up, whats recommended testing wise? I’d like to try TDD, should I be using multiple libraries?
py.test, steer clear of unittest or any port/fork of it.
Links: py.test, unittest
steer clear of unittest or any port/fork of it.
Why?
it forces you to use classes as if they were modules. After all it is a port of Java’s JUnit, and comes with the same symptoms.
This looks a lot simpler and more pleasant than unittest, thanks!
I won’t defend unittest, but I will say that unittest.mock can be used independently and is a pretty nice mocking library: https://docs.python.org/3/library/unittest.mock.html
I blogged about pyrhon test runners http://www.holger-peters.de/why-i-use-pytest.html (doesnt include hypothesis though). But hypothesis can be a good complement.
We have an interview in an upcoming episode with Hypothesis author on the podcast I cohost: http://pythonpodcast.com/
Might have some python work coming up, whats recommended testing wise? I’d like to try TDD, should I be using multiple libraries?
py.test, steer clear of unittest or any port/fork of it.
Links: py.test, unittest
Why?
it forces you to use classes as if they were modules. After all it is a port of Java’s JUnit, and comes with the same symptoms.
This looks a lot simpler and more pleasant than unittest, thanks!
I won’t defend unittest, but I will say that unittest.mock can be used independently and is a pretty nice mocking library: https://docs.python.org/3/library/unittest.mock.html
I blogged about pyrhon test runners http://www.holger-peters.de/why-i-use-pytest.html (doesnt include hypothesis though). But hypothesis can be a good complement.