unittest_expander – test parametrization library¶
Welcome to the documentation for unittest_expander – a Python library
that provides flexible and easy-to-use tools to parametrize unit
tests, especially (but not limited to) those based on
unittest.TestCase
.
- Getting Started
- Narrative Documentation
- Basic use of
expand()
andforeach()
- More flexibility:
param
- Other ways to explicitly label your tests
- Smart parameter collection:
paramseq
- Combining several
foreach()
to get Cartesian product - Context-manager-based fixtures:
param.context()
- Convenience shortcut:
paramseq.context()
- Contexts cannot suppress exceptions unless you enable that explicitly
- Context order
- Access the current parametrized test’s metadata via
current
- Deprecated feature: accepting
label
andcontext_targets
as keyword arguments Substitute
objects- Custom method name formatting
- Name clashes avoided automatically
- Questions and answers about various details…
- Basic use of
- Module Contents
- Changes
- License, Credits and Other Information