unittest — Unit testing framework — Python 3.14.7 documentation

docs.python.org

Tin mới

doctest — Test interactive Python examples

unittest.mock — mock object library

Python Module Index

3.14.7 Documentation

The Python Standard Library

controlled using environment variables

Added in version 3.14: Output is colorized by default and can be controlled using environment variables.

fnmatch.fnmatchcase()

Only run test methods and classes that match the pattern or substring. This option may be used multiple times, in which case all test cases that match any of the given patterns are included.

namespace packages

Changed in version 3.4: Test discovery supports namespace packages.

frozenset.difference

Tests that two sets are equal. If not, an error message is constructed that lists the differences between the sets. This method is used by default when comparing sets or frozensets with assertEqual().

DeprecationWarning

By default this runner shows DeprecationWarning, PendingDeprecationWarning, ResourceWarning and ImportWarning even if they are ignored by default. This behavior can be overridden using Python’s -Wd or -Wa options (see Wa

ignored by default

By default this runner shows DeprecationWarning, PendingDeprecationWarning, ResourceWarning and ImportWarning even if they are ignored by default. This behavior can be overridden using Python’s -Wd or -Wa options (see Wa