[TIP] Which unittest extensions are very important in current test practices?

Ben Finney ben+python at benfinney.id.au
Wed Apr 27 14:04:05 PDT 2016


Brian Okken <variedthoughts at gmail.com> writes:

> This is obvious:
>
> * mock (still an extension for 2.7, built in to 3.5)

Yes, for a code base that supports both Python 2 and Python 3, it is
important that ‘import mock’ will import the up-to-date ‘mock’.

> * testtools
> * fixtures

‘testtools’ is a dependency for ‘testresources’ and ‘testscenarios’.
‘fixtures’ is a dependency for ‘testresources’.

> * testscenarios

This provides very useful features not yet found in ‘unittest’,
including the ability to define a set of data scenarios in a TestCase
class, and have the TestCase instances automatically multiplied at run
time, for each scenario.

-- 
 \     “The Vatican is not a state.… a state must have territory. This |
  `\         is a palace with gardens, about as big as an average golf |
_o__)                         course.” —Geoffrey Robertson, 2010-09-18 |
Ben Finney




More information about the testing-in-python mailing list