unittest.TestResult.addSubTest()
  • References/Python/Python/Development Tools

addSubTest(test, subtest, outcome) Called when a subtest finishes. test is the test case corresponding to the test

2025-01-10 15:47:30
unittest.mock.Mock.called
  • References/Python/Python/Development Tools

called A boolean representing whether or not the mock object has been called:

2025-01-10 15:47:30
unittest.mock.Mock.configure_mock()
  • References/Python/Python/Development Tools

configure_mock(**kwargs) Set attributes on the mock through keyword arguments. Attributes plus

2025-01-10 15:47:30
unittest.TestCase.assertTrue()
  • References/Python/Python/Development Tools

assertTrue(expr, msg=None) assertFalse(expr, msg=None) Test that expr is true (or false).

2025-01-10 15:47:30
unittest.mock.Mock.
  • References/Python/Python/Development Tools

__dir__() Mock objects limit the results of dir(some_mock) to useful results. For mocks with a spec

2025-01-10 15:47:30
doctest.Example.want
  • References/Python/Python/Development Tools

want The expected output from running the example’s source code (either from stdout, or a traceback in case of exception). want

2025-01-10 15:47:30
doctest.DocTest.name
  • References/Python/Python/Development Tools

name A string name identifying the DocTest. Typically, this is the name of the object or file that the test was

2025-01-10 15:47:30
unittest.mock.Mock.side_effect
  • References/Python/Python/Development Tools

side_effect This can either be a function to be called when the mock is called, an iterable or an exception (class or instance)

2025-01-10 15:47:30
unittest.TestLoader
  • References/Python/Python/Development Tools

class unittest.TestLoader The TestLoader class is used to create test suites from classes and modules. Normally

2025-01-10 15:47:30
typing.Reversible
  • References/Python/Python/Development Tools

class typing.Reversible An ABC with one abstract method __reversed__ returning an Iterator[T_co].

2025-01-10 15:47:30