Although not designed to support all its features when running unittest-based tests, a few of the pytest idioms are supported:
- Plain asserts: pytest assertion introspect works just as well when subclassing unittest.TestCase
- Marks: marks can be applied normally to unittest test methods and classes. Plugins that deal with marks should work normally in most cases (for example, pytest-timeout marks)
- Autouse fixtures: autouse fixtures defined in modules or conftest.py files will be created/destroyed when executing unittest test methods normally, including unittest subclasses in the case of class-scoped autouse fixtures
- Test selection: -k and -m in the command line should work as normal
Other pytest features ...