chunk_id
stringlengths
36
36
source
stringclasses
35 values
source_url
stringlengths
0
290
upstream_license
stringclasses
1 value
document_id
stringlengths
36
36
chunk_index
int64
0
324k
retrieved_at
stringclasses
2 values
chunker_version
stringclasses
4 values
content_hash
stringlengths
15
64
content
stringlengths
50
44.7k
namespace
stringclasses
9 values
source_name
stringclasses
35 values
raw_text
stringlengths
50
44.7k
cleaned_text
stringlengths
50
44.7k
tags
stringclasses
49 values
collection_name
stringclasses
11 values
a83060e8-2785-49f1-846a-f26dba2c6981
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,760
supabase-export-v2
b8820281f2a03a1e
.. method:: assertWarns(warning, callable, *args, **kwds) assertWarns(warning, *, msg=None) Test that a warning is triggered when *callable* is called with any positional or keyword arguments that are also passed to :meth:`assertWarns`. The test passes if *warning* is triggered and fails if it isn't. Any exception i...
trusted_official_docs
CPython Docs
.. method:: assertWarns(warning, callable, *args, **kwds) assertWarns(warning, *, msg=None) Test that a warning is triggered when *callable* is called with any positional or keyword arguments that are also passed to :meth:`assertWarns`. The test passes if *warning* is triggered and fails if it isn't. Any exception i...
.. method:: assertWarns(warning, callable, *args, **kwds) assertWarns(warning, *, msg=None) Test that a warning is triggered when *callable* is called with any positional or keyword arguments that are also passed to :meth:`assertWarns`. The test passes if *warning* is triggered and fails if it isn't. Any exception i...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a9be4598-e58e-419b-83ad-bd6e898dead7
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,989
supabase-export-v2
212577dc24cbf9ec
discovery takes care to ensure that a package is only checked for tests once during an invocation, even if the load_tests function itself calls ``loader.discover``. If ``load_tests`` exists then discovery does *not* recurse into the package, ``load_tests`` is responsible for loading all tests in the package.
trusted_official_docs
CPython Docs
discovery takes care to ensure that a package is only checked for tests once during an invocation, even if the load_tests function itself calls ``loader.discover``. If ``load_tests`` exists then discovery does *not* recurse into the package, ``load_tests`` is responsible for loading all tests in the package.
discovery takes care to ensure that a package is only checked for tests once during an invocation, even if the load_tests function itself calls ``loader.discover``. If ``load_tests`` exists then discovery does *not* recurse into the package, ``load_tests`` is responsible for loading all tests in the package.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a9c3275e-3f3d-4e6b-8bfc-9d970e375f29
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,945
supabase-export-v2
7d6c0b3303bdd301
.. method:: run(result) Run the tests associated with this suite, collecting the result into the test result object passed as *result*. Note that unlike :meth:`TestCase.run`, :meth:`TestSuite.run` requires the result object to be passed in.
trusted_official_docs
CPython Docs
.. method:: run(result) Run the tests associated with this suite, collecting the result into the test result object passed as *result*. Note that unlike :meth:`TestCase.run`, :meth:`TestSuite.run` requires the result object to be passed in.
.. method:: run(result) Run the tests associated with this suite, collecting the result into the test result object passed as *result*. Note that unlike :meth:`TestCase.run`, :meth:`TestSuite.run` requires the result object to be passed in.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ab1e8dfa-b82a-43c8-8bff-7650b89a585c
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,047
supabase-export-v2
c96b4194095a948d
being run should be aborted by setting the :attr:`shouldStop` attribute to ``True``. :class:`!TestRunner` objects should respect this flag and return without running any additional tests. For example, this feature is used by the :class:`TextTestRunner` class to stop the test framework when the user signals an interrup...
trusted_official_docs
CPython Docs
being run should be aborted by setting the :attr:`shouldStop` attribute to ``True``. :class:`!TestRunner` objects should respect this flag and return without running any additional tests. For example, this feature is used by the :class:`TextTestRunner` class to stop the test framework when the user signals an interrup...
being run should be aborted by setting the :attr:`shouldStop` attribute to ``True``. :class:`!TestRunner` objects should respect this flag and return without running any additional tests. For example, this feature is used by the :class:`TextTestRunner` class to stop the test framework when the user signals an interrup...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ae24adaf-ff54-42b4-9798-9e36a53a0f4e
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,679
supabase-export-v2
d2a38d8f81e6266c
runner to allow it to drive the tests, and methods that the test code can use to check for and report various kinds of failure. Each instance of :class:`TestCase` will run a single base method: the method named *methodName*. In most uses of :class:`TestCase`, you will neither change the *methodName* nor reimplement t...
trusted_official_docs
CPython Docs
runner to allow it to drive the tests, and methods that the test code can use to check for and report various kinds of failure. Each instance of :class:`TestCase` will run a single base method: the method named *methodName*. In most uses of :class:`TestCase`, you will neither change the *methodName* nor reimplement t...
runner to allow it to drive the tests, and methods that the test code can use to check for and report various kinds of failure. Each instance of :class:`TestCase` will run a single base method: the method named *methodName*. In most uses of :class:`TestCase`, you will neither change the *methodName* nor reimplement t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ae6c85c6-8705-44b7-9d37-3c7d997e958a
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,667
supabase-export-v2
367cf77cff11fb30
def test_even(self): """ Test that numbers between 0 and 5 are all even. """ for i in range(0, 6): with self.subTest(i=i): self.assertEqual(i % 2, 0) will produce the following output::
trusted_official_docs
CPython Docs
def test_even(self): """ Test that numbers between 0 and 5 are all even. """ for i in range(0, 6): with self.subTest(i=i): self.assertEqual(i % 2, 0) will produce the following output::
def test_even(self): """ Test that numbers between 0 and 5 are all even. """ for i in range(0, 6): with self.subTest(i=i): self.assertEqual(i % 2, 0) will produce the following output::
python, official-docs, cpython, P0
Local_Trusted_Corpus
ae6e82e7-05b3-449f-906f-a5dae0699a39
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,480
supabase-export-v2
7490682a9b36c36c
To achieve this, :mod:`!unittest` supports some important concepts in an object-oriented way: test fixture A :dfn:`test fixture` represents the preparation needed to perform one or more tests, and any associated cleanup actions. This may involve, for example, creating temporary or proxy databases, directories, or st...
trusted_official_docs
CPython Docs
To achieve this, :mod:`!unittest` supports some important concepts in an object-oriented way: test fixture A :dfn:`test fixture` represents the preparation needed to perform one or more tests, and any associated cleanup actions. This may involve, for example, creating temporary or proxy databases, directories, or st...
To achieve this, :mod:`!unittest` supports some important concepts in an object-oriented way: test fixture A :dfn:`test fixture` represents the preparation needed to perform one or more tests, and any associated cleanup actions. This may involve, for example, creating temporary or proxy databases, directories, or st...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b07e0b67-3f13-46b2-a34c-e7d5cfe13317
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,185
supabase-export-v2
4cb4015341ba778b
.. function:: removeHandler(function=None) When called without arguments this function removes the control-c handler if it has been installed. This function can also be used as a test decorator to temporarily remove the handler while the test is being executed::
trusted_official_docs
CPython Docs
.. function:: removeHandler(function=None) When called without arguments this function removes the control-c handler if it has been installed. This function can also be used as a test decorator to temporarily remove the handler while the test is being executed::
.. function:: removeHandler(function=None) When called without arguments this function removes the control-c handler if it has been installed. This function can also be used as a test decorator to temporarily remove the handler while the test is being executed::
python, official-docs, cpython, P0
Local_Trusted_Corpus
b1551999-d7b5-4e7e-8e1c-2d607e1d24cf
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,502
supabase-export-v2
79d61c42e18f054c
individual tests are defined with methods whose names start with the letters ``test``. This naming convention informs the test runner about which methods represent tests. The crux of each test is a call to :meth:`~TestCase.assertEqual` to check for an expected result; :meth:`~TestCase.assertTrue` or :meth:`~TestCase.as...
trusted_official_docs
CPython Docs
individual tests are defined with methods whose names start with the letters ``test``. This naming convention informs the test runner about which methods represent tests. The crux of each test is a call to :meth:`~TestCase.assertEqual` to check for an expected result; :meth:`~TestCase.assertTrue` or :meth:`~TestCase.as...
individual tests are defined with methods whose names start with the letters ``test``. This naming convention informs the test runner about which methods represent tests. The crux of each test is a call to :meth:`~TestCase.assertEqual` to check for an expected result; :meth:`~TestCase.assertTrue` or :meth:`~TestCase.as...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b1d193ca-c972-43cc-9697-c6b53ae01213
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,998
supabase-export-v2
85ecf3c8a4e8b9fc
are now checked for ``load_tests`` regardless of whether their path matches *pattern*, because it is impossible for a package name to match the default pattern. .. versionchanged:: 3.11 *start_dir* can not be a :term:`namespace packages <namespace package>`. It has been broken since Python 3.7, and Python 3.11 officia...
trusted_official_docs
CPython Docs
are now checked for ``load_tests`` regardless of whether their path matches *pattern*, because it is impossible for a package name to match the default pattern. .. versionchanged:: 3.11 *start_dir* can not be a :term:`namespace packages <namespace package>`. It has been broken since Python 3.7, and Python 3.11 officia...
are now checked for ``load_tests`` regardless of whether their path matches *pattern*, because it is impossible for a package name to match the default pattern. .. versionchanged:: 3.11 *start_dir* can not be a :term:`namespace packages <namespace package>`. It has been broken since Python 3.7, and Python 3.11 officia...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b1dc55da-8a28-40ed-b3c2-30c176d54fc6
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,715
supabase-export-v2
63f3b8de9009ba07
Test that *first* and *second* are equal. If the values do not compare equal, the test will fail. In addition, if *first* and *second* are the exact same type and one of list, tuple, dict, set, frozenset or str or any type that a subclass registers with :meth:`addTypeEqualityFunc` the type-specific equality function...
trusted_official_docs
CPython Docs
Test that *first* and *second* are equal. If the values do not compare equal, the test will fail. In addition, if *first* and *second* are the exact same type and one of list, tuple, dict, set, frozenset or str or any type that a subclass registers with :meth:`addTypeEqualityFunc` the type-specific equality function...
Test that *first* and *second* are equal. If the values do not compare equal, the test will fail. In addition, if *first* and *second* are the exact same type and one of list, tuple, dict, set, frozenset or str or any type that a subclass registers with :meth:`addTypeEqualityFunc` the type-specific equality function...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b34139b3-e093-4f81-afa8-51190d9cb39d
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,504
supabase-export-v2
d5527ad1732e5176
allow you to define instructions that will be executed before and after each test method. They are covered in more detail in the section :ref:`organizing-tests`. The final block shows a simple way to run the tests. :func:`unittest.main` provides a command-line interface to the test script. When run from the command lin...
trusted_official_docs
CPython Docs
allow you to define instructions that will be executed before and after each test method. They are covered in more detail in the section :ref:`organizing-tests`. The final block shows a simple way to run the tests. :func:`unittest.main` provides a command-line interface to the test script. When run from the command lin...
allow you to define instructions that will be executed before and after each test method. They are covered in more detail in the section :ref:`organizing-tests`. The final block shows a simple way to run the tests. :func:`unittest.main` provides a command-line interface to the test script. When run from the command lin...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b4766e07-666a-49d9-a7ae-115fdacecdcd
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,112
supabase-export-v2
9b93eef7543cad33
The *testLoader* argument has to be a :class:`TestLoader` instance, and defaults to :data:`defaultTestLoader`. ``main`` supports being used from the interactive interpreter by passing in the argument ``exit=False``. This displays the result on standard output without calling :func:`sys.exit`::
trusted_official_docs
CPython Docs
The *testLoader* argument has to be a :class:`TestLoader` instance, and defaults to :data:`defaultTestLoader`. ``main`` supports being used from the interactive interpreter by passing in the argument ``exit=False``. This displays the result on standard output without calling :func:`sys.exit`::
The *testLoader* argument has to be a :class:`TestLoader` instance, and defaults to :data:`defaultTestLoader`. ``main`` supports being used from the interactive interpreter by passing in the argument ``exit=False``. This displays the result on standard output without calling :func:`sys.exit`::
python, official-docs, cpython, P0
Local_Trusted_Corpus
b4e01fed-32a4-453d-b598-473d28e00d4b
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,145
supabase-export-v2
1117a26e1e116c91
Shared fixtures are not intended to work with suites with non-standard ordering. A ``BaseTestSuite`` still exists for frameworks that don't want to support shared fixtures. If there are any exceptions raised during one of the shared fixture functions the test is reported as an error. Because there is no corresponding t...
trusted_official_docs
CPython Docs
Shared fixtures are not intended to work with suites with non-standard ordering. A ``BaseTestSuite`` still exists for frameworks that don't want to support shared fixtures. If there are any exceptions raised during one of the shared fixture functions the test is reported as an error. Because there is no corresponding t...
Shared fixtures are not intended to work with suites with non-standard ordering. A ``BaseTestSuite`` still exists for frameworks that don't want to support shared fixtures. If there are any exceptions raised during one of the shared fixture functions the test is reported as an error. Because there is no corresponding t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b7110e18-e4f3-463a-93f0-ee4215c09a18
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,140
supabase-export-v2
b73bfea907fde2e7
a test from a new class then :meth:`~TestCase.tearDownClass` from the previous class (if there is one) is called, followed by :meth:`~TestCase.setUpClass` from the new class. Similarly if a test is from a different module from the previous test then ``tearDownModule`` from the previous module is run, followed by ``setU...
trusted_official_docs
CPython Docs
a test from a new class then :meth:`~TestCase.tearDownClass` from the previous class (if there is one) is called, followed by :meth:`~TestCase.setUpClass` from the new class. Similarly if a test is from a different module from the previous test then ``tearDownModule`` from the previous module is run, followed by ``setU...
a test from a new class then :meth:`~TestCase.tearDownClass` from the previous class (if there is one) is called, followed by :meth:`~TestCase.setUpClass` from the new class. Similarly if a test is from a different module from the previous test then ``tearDownModule`` from the previous module is run, followed by ``setU...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b7c0b431-e8c9-439d-8488-7e9e58ebc9da
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,842
supabase-export-v2
578000ef7860fd1c
.. method:: assertSequenceEqual(first, second, msg=None, seq_type=None) Tests that two sequences are equal. If a *seq_type* is supplied, both *first* and *second* must be instances of *seq_type* or a failure will be raised. If the sequences are different an error message is constructed that shows the difference betw...
trusted_official_docs
CPython Docs
.. method:: assertSequenceEqual(first, second, msg=None, seq_type=None) Tests that two sequences are equal. If a *seq_type* is supplied, both *first* and *second* must be instances of *seq_type* or a failure will be raised. If the sequences are different an error message is constructed that shows the difference betw...
.. method:: assertSequenceEqual(first, second, msg=None, seq_type=None) Tests that two sequences are equal. If a *seq_type* is supplied, both *first* and *second* must be instances of *seq_type* or a failure will be raised. If the sequences are different an error message is constructed that shows the difference betw...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b7cd1633-8f80-48fd-b8a6-2142ce097738
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,556
supabase-export-v2
ebe501835b948b34
must be :ref:`modules <tut-modules>` or :ref:`packages <tut-packages>` importable from the top-level directory of the project (this means that their filenames must be valid :ref:`identifiers <identifiers>`). Test discovery is implemented in :meth:`TestLoader.discover`, but can also be used from the command line. The ba...
trusted_official_docs
CPython Docs
must be :ref:`modules <tut-modules>` or :ref:`packages <tut-packages>` importable from the top-level directory of the project (this means that their filenames must be valid :ref:`identifiers <identifiers>`). Test discovery is implemented in :meth:`TestLoader.discover`, but can also be used from the command line. The ba...
must be :ref:`modules <tut-modules>` or :ref:`packages <tut-packages>` importable from the top-level directory of the project (this means that their filenames must be valid :ref:`identifiers <identifiers>`). Test discovery is implemented in :meth:`TestLoader.discover`, but can also be used from the command line. The ba...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b87ebd5c-c22a-4c20-a51f-868e8faba7ee
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,018
supabase-export-v2
4317b41335a296cd
the :class:`TestResult` object generated by running a set of tests for reporting purposes; a :class:`TestResult` instance is returned by the :meth:`!TestRunner.run` method for this purpose. :class:`TestResult` instances have the following attributes that will be of interest when inspecting the results of running a set...
trusted_official_docs
CPython Docs
the :class:`TestResult` object generated by running a set of tests for reporting purposes; a :class:`TestResult` instance is returned by the :meth:`!TestRunner.run` method for this purpose. :class:`TestResult` instances have the following attributes that will be of interest when inspecting the results of running a set...
the :class:`TestResult` object generated by running a set of tests for reporting purposes; a :class:`TestResult` instance is returned by the :meth:`!TestRunner.run` method for this purpose. :class:`TestResult` instances have the following attributes that will be of interest when inspecting the results of running a set...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bb530532-ba02-430e-9ec5-02528f1c5061
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,862
supabase-export-v2
3d124d526584e8e7
.. attribute:: longMessage This class attribute determines what happens when a custom failure message is passed as the msg argument to an assertXYY call that fails. ``True`` is the default value. In this case, the custom message is appended to the end of the standard failure message. When set to ``False``, the custom...
trusted_official_docs
CPython Docs
.. attribute:: longMessage This class attribute determines what happens when a custom failure message is passed as the msg argument to an assertXYY call that fails. ``True`` is the default value. In this case, the custom message is appended to the end of the standard failure message. When set to ``False``, the custom...
.. attribute:: longMessage This class attribute determines what happens when a custom failure message is passed as the msg argument to an assertXYY call that fails. ``True`` is the default value. In this case, the custom message is appended to the end of the standard failure message. When set to ``False``, the custom...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bb84f692-4932-4e7a-9f1a-60853491a73c
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,659
supabase-export-v2
c94f0b2b9bebc1a6
Usually you can use :meth:`TestCase.skipTest` or one of the skipping decorators instead of raising this directly. Skipped tests will not have :meth:`~TestCase.setUp` or :meth:`~TestCase.tearDown` run around them. Skipped classes will not have :meth:`~TestCase.setUpClass` or :meth:`~TestCase.tearDownClass` run. Skipped ...
trusted_official_docs
CPython Docs
Usually you can use :meth:`TestCase.skipTest` or one of the skipping decorators instead of raising this directly. Skipped tests will not have :meth:`~TestCase.setUp` or :meth:`~TestCase.tearDown` run around them. Skipped classes will not have :meth:`~TestCase.setUpClass` or :meth:`~TestCase.tearDownClass` run. Skipped ...
Usually you can use :meth:`TestCase.skipTest` or one of the skipping decorators instead of raising this directly. Skipped tests will not have :meth:`~TestCase.setUp` or :meth:`~TestCase.tearDown` run around them. Skipped classes will not have :meth:`~TestCase.setUpClass` or :meth:`~TestCase.tearDownClass` run. Skipped ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bc9932c5-44a1-462f-b371-e266f9dec9c4
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,144
supabase-export-v2
3bfc90e0775ebfad
from different modules and classes are adjacent to each other, then these shared fixture functions may be called multiple times in a single test run. Shared fixtures are not intended to work with suites with non-standard ordering. A ``BaseTestSuite`` still exists for frameworks that don't want to support shared fixture...
trusted_official_docs
CPython Docs
from different modules and classes are adjacent to each other, then these shared fixture functions may be called multiple times in a single test run. Shared fixtures are not intended to work with suites with non-standard ordering. A ``BaseTestSuite`` still exists for frameworks that don't want to support shared fixture...
from different modules and classes are adjacent to each other, then these shared fixture functions may be called multiple times in a single test run. Shared fixtures are not intended to work with suites with non-standard ordering. A ``BaseTestSuite`` still exists for frameworks that don't want to support shared fixture...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bd78a156-fd8a-4604-a5fd-f2b80ca7ac70
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,169
supabase-export-v2
90e7fb0edf9dc96c
This function is called unconditionally after :func:`tearDownModule`, or after :func:`setUpModule` if :func:`setUpModule` raises an exception. It is responsible for calling all the cleanup functions added by :func:`addModuleCleanup`. If you need cleanup functions to be called *prior* to :func:`tearDownModule` then yo...
trusted_official_docs
CPython Docs
This function is called unconditionally after :func:`tearDownModule`, or after :func:`setUpModule` if :func:`setUpModule` raises an exception. It is responsible for calling all the cleanup functions added by :func:`addModuleCleanup`. If you need cleanup functions to be called *prior* to :func:`tearDownModule` then yo...
This function is called unconditionally after :func:`tearDownModule`, or after :func:`setUpModule` if :func:`setUpModule` raises an exception. It is responsible for calling all the cleanup functions added by :func:`addModuleCleanup`. If you need cleanup functions to be called *prior* to :func:`tearDownModule` then yo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
be88313f-91cd-4f9c-b652-3b9b571aa558
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,170
supabase-export-v2
422ca26e5a3ff19c
calling all the cleanup functions added by :func:`addModuleCleanup`. If you need cleanup functions to be called *prior* to :func:`tearDownModule` then you can call :func:`doModuleCleanups` yourself. :func:`doModuleCleanups` pops methods off the stack of cleanup functions one at a time, so it can be called at any time.
trusted_official_docs
CPython Docs
calling all the cleanup functions added by :func:`addModuleCleanup`. If you need cleanup functions to be called *prior* to :func:`tearDownModule` then you can call :func:`doModuleCleanups` yourself. :func:`doModuleCleanups` pops methods off the stack of cleanup functions one at a time, so it can be called at any time.
calling all the cleanup functions added by :func:`addModuleCleanup`. If you need cleanup functions to be called *prior* to :func:`tearDownModule` then you can call :func:`doModuleCleanups` yourself. :func:`doModuleCleanups` pops methods off the stack of cleanup functions one at a time, so it can be called at any time.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c019a61b-a6c0-4f5a-ad01-66a25a8f1b8a
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,813
supabase-export-v2
e6f36e09125c7813
.. method:: assertGreater(first, second, msg=None) assertGreaterEqual(first, second, msg=None) assertLess(first, second, msg=None) assertLessEqual(first, second, msg=None) Test that *first* is respectively >, >=, < or <= than *second* depending on the method name. If not, the test will fail::
trusted_official_docs
CPython Docs
.. method:: assertGreater(first, second, msg=None) assertGreaterEqual(first, second, msg=None) assertLess(first, second, msg=None) assertLessEqual(first, second, msg=None) Test that *first* is respectively >, >=, < or <= than *second* depending on the method name. If not, the test will fail::
.. method:: assertGreater(first, second, msg=None) assertGreaterEqual(first, second, msg=None) assertLess(first, second, msg=None) assertLessEqual(first, second, msg=None) Test that *first* is respectively >, >=, < or <= than *second* depending on the method name. If not, the test will fail::
python, official-docs, cpython, P0
Local_Trusted_Corpus
c16be472-5c1e-42de-87d0-f9ad1a8cc4d5
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,889
supabase-export-v2
6e77aea5393103af
calling all the cleanup functions added by :meth:`addCleanup`. If you need cleanup functions to be called *prior* to :meth:`tearDown` then you can call :meth:`doCleanups` yourself. :meth:`doCleanups` pops methods off the stack of cleanup functions one at a time, so it can be called at any time.
trusted_official_docs
CPython Docs
calling all the cleanup functions added by :meth:`addCleanup`. If you need cleanup functions to be called *prior* to :meth:`tearDown` then you can call :meth:`doCleanups` yourself. :meth:`doCleanups` pops methods off the stack of cleanup functions one at a time, so it can be called at any time.
calling all the cleanup functions added by :meth:`addCleanup`. If you need cleanup functions to be called *prior* to :meth:`tearDown` then you can call :meth:`doCleanups` yourself. :meth:`doCleanups` pops methods off the stack of cleanup functions one at a time, so it can be called at any time.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c17b036b-f7e3-48af-8e35-3da6bb8b08d8
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,740
supabase-export-v2
6219c2b5f0a5e672
+---------------------------------------------------------+--------------------------------------+------------+ | :meth:`assertNoLogs(logger, level) | The ``with`` block does not log on | 3.10 | | <TestCase.assertNoLogs>` | *logger* with minimum *level* | | +---------------------------------------------------------+---...
trusted_official_docs
CPython Docs
+---------------------------------------------------------+--------------------------------------+------------+ | :meth:`assertNoLogs(logger, level) | The ``with`` block does not log on | 3.10 | | <TestCase.assertNoLogs>` | *logger* with minimum *level* | | +---------------------------------------------------------+---...
+---------------------------------------------------------+--------------------------------------+------------+ | :meth:`assertNoLogs(logger, level) | The ``with`` block does not log on | 3.10 | | <TestCase.assertNoLogs>` | *logger* with minimum *level* | | +---------------------------------------------------------+---...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c1830267-ba7c-4fa3-ac3b-e577ecddc27a
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,839
supabase-export-v2
2e2c04cc10faf8e2
.. method:: assertMultiLineEqual(first, second, msg=None) Test that the multiline string *first* is equal to the string *second*. When not equal a diff of the two strings highlighting the differences will be included in the error message. This method is used by default when comparing strings with :meth:`assertEqual`.
trusted_official_docs
CPython Docs
.. method:: assertMultiLineEqual(first, second, msg=None) Test that the multiline string *first* is equal to the string *second*. When not equal a diff of the two strings highlighting the differences will be included in the error message. This method is used by default when comparing strings with :meth:`assertEqual`.
.. method:: assertMultiLineEqual(first, second, msg=None) Test that the multiline string *first* is equal to the string *second*. When not equal a diff of the two strings highlighting the differences will be included in the error message. This method is used by default when comparing strings with :meth:`assertEqual`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c1fe632f-4c0d-437b-a0da-ab4cc5d1bea3
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,668
supabase-export-v2
7f3aacda5438eb35
will produce the following output:: ====================================================================== FAIL: test_even (__main__.NumbersTest.test_even) (i=1) Test that numbers between 0 and 5 are all even. ---------------------------------------------------------------------- Traceback (most recent call last): ...
trusted_official_docs
CPython Docs
will produce the following output:: ====================================================================== FAIL: test_even (__main__.NumbersTest.test_even) (i=1) Test that numbers between 0 and 5 are all even. ---------------------------------------------------------------------- Traceback (most recent call last): ...
will produce the following output:: ====================================================================== FAIL: test_even (__main__.NumbersTest.test_even) (i=1) Test that numbers between 0 and 5 are all even. ---------------------------------------------------------------------- Traceback (most recent call last): ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c2a11eea-cbc3-41d7-83e3-cabb8ba5d548
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,712
supabase-export-v2
1b65c40c15977fd7
| 3.14 | | <TestCase.assertIsSubclass>` | | | +-----------------------------------------+-----------------------------+---------------+ | :meth:`assertNotIsSubclass(a, b) | ``not issubclass(a, b)`` | 3.14 | | <TestCase.assertNotIsSubclass>` | | | +-----------------------------------------+-----------------------------+...
trusted_official_docs
CPython Docs
| 3.14 | | <TestCase.assertIsSubclass>` | | | +-----------------------------------------+-----------------------------+---------------+ | :meth:`assertNotIsSubclass(a, b) | ``not issubclass(a, b)`` | 3.14 | | <TestCase.assertNotIsSubclass>` | | | +-----------------------------------------+-----------------------------+...
| 3.14 | | <TestCase.assertIsSubclass>` | | | +-----------------------------------------+-----------------------------+---------------+ | :meth:`assertNotIsSubclass(a, b) | ``not issubclass(a, b)`` | 3.14 | | <TestCase.assertNotIsSubclass>` | | | +-----------------------------------------+-----------------------------+...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c333ca08-0f71-435b-970a-65beae092ba3
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,954
supabase-export-v2
33f5dfba280537bf
.. versionchanged:: 3.4 In earlier versions the :class:`TestSuite` held references to each :class:`TestCase` after :meth:`TestSuite.run`. Subclasses can restore that behavior by overriding :meth:`!TestSuite._removeTestAtIndex`. In the typical usage of a :class:`TestSuite` object, the :meth:`run` method is invoked by a...
trusted_official_docs
CPython Docs
.. versionchanged:: 3.4 In earlier versions the :class:`TestSuite` held references to each :class:`TestCase` after :meth:`TestSuite.run`. Subclasses can restore that behavior by overriding :meth:`!TestSuite._removeTestAtIndex`. In the typical usage of a :class:`TestSuite` object, the :meth:`run` method is invoked by a...
.. versionchanged:: 3.4 In earlier versions the :class:`TestSuite` held references to each :class:`TestCase` after :meth:`TestSuite.run`. Subclasses can restore that behavior by overriding :meth:`!TestSuite._removeTestAtIndex`. In the typical usage of a :class:`TestSuite` object, the :meth:`run` method is invoked by a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c3a0222f-964d-4434-995f-618df8cbe347
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,633
supabase-export-v2
6213bdd3278b8dc3
@unittest.skip("demonstrating skipping") def test_nothing(self): self.fail("shouldn't happen") @unittest.skipIf(mylib.__version__ < (1, 3), "not supported in this library version") def test_format(self): # Tests that work for only a certain version of the library. pass
trusted_official_docs
CPython Docs
@unittest.skip("demonstrating skipping") def test_nothing(self): self.fail("shouldn't happen") @unittest.skipIf(mylib.__version__ < (1, 3), "not supported in this library version") def test_format(self): # Tests that work for only a certain version of the library. pass
@unittest.skip("demonstrating skipping") def test_nothing(self): self.fail("shouldn't happen") @unittest.skipIf(mylib.__version__ < (1, 3), "not supported in this library version") def test_format(self): # Tests that work for only a certain version of the library. pass
python, official-docs, cpython, P0
Local_Trusted_Corpus
c520e5ae-6c5b-4ce8-ad0e-9600c43c5739
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,881
supabase-export-v2
5d13b559e3b8a898
.. method:: addCleanup(function, /, *args, **kwargs) Add a function to be called after :meth:`tearDown` to cleanup resources used during the test. Functions will be called in reverse order to the order they are added (:abbr:`LIFO (last-in, first-out)`). They are called with any arguments and keyword arguments passed...
trusted_official_docs
CPython Docs
.. method:: addCleanup(function, /, *args, **kwargs) Add a function to be called after :meth:`tearDown` to cleanup resources used during the test. Functions will be called in reverse order to the order they are added (:abbr:`LIFO (last-in, first-out)`). They are called with any arguments and keyword arguments passed...
.. method:: addCleanup(function, /, *args, **kwargs) Add a function to be called after :meth:`tearDown` to cleanup resources used during the test. Functions will be called in reverse order to the order they are added (:abbr:`LIFO (last-in, first-out)`). They are called with any arguments and keyword arguments passed...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c5af905c-c548-47ac-b40c-fd19b4a2aae2
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,141
supabase-export-v2
2d5a08528bbd2d1c
test is from a different module from the previous test then ``tearDownModule`` from the previous module is run, followed by ``setUpModule`` from the new module. After all the tests have run the final ``tearDownClass`` and ``tearDownModule`` are run.
trusted_official_docs
CPython Docs
test is from a different module from the previous test then ``tearDownModule`` from the previous module is run, followed by ``setUpModule`` from the new module. After all the tests have run the final ``tearDownClass`` and ``tearDownModule`` are run.
test is from a different module from the previous test then ``tearDownModule`` from the previous module is run, followed by ``setUpModule`` from the new module. After all the tests have run the final ``tearDownClass`` and ``tearDownModule`` are run.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c8e4fd97-bd86-4134-bda0-a42779375c67
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,535
supabase-export-v2
3bcebcda139c4c4e
test run waits for the current test to end and then reports all the results so far. A second :kbd:`Control-C` raises the normal :exc:`KeyboardInterrupt` exception. See `Signal Handling`_ for the functions that provide this functionality.
trusted_official_docs
CPython Docs
test run waits for the current test to end and then reports all the results so far. A second :kbd:`Control-C` raises the normal :exc:`KeyboardInterrupt` exception. See `Signal Handling`_ for the functions that provide this functionality.
test run waits for the current test to end and then reports all the results so far. A second :kbd:`Control-C` raises the normal :exc:`KeyboardInterrupt` exception. See `Signal Handling`_ for the functions that provide this functionality.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c98c0aa4-c632-436d-a8ac-265531ed4c62
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,594
supabase-export-v2
77d56c5feac6bf5b
def test_widget_resize(self): self.widget.resize(100,150) self.assertEqual(self.widget.size(), (100,150), 'wrong size after resize') .. note:: The order in which the various tests will be run is determined by sorting the test method names with respect to the built-in ordering for strings.
trusted_official_docs
CPython Docs
def test_widget_resize(self): self.widget.resize(100,150) self.assertEqual(self.widget.size(), (100,150), 'wrong size after resize') .. note:: The order in which the various tests will be run is determined by sorting the test method names with respect to the built-in ordering for strings.
def test_widget_resize(self): self.widget.resize(100,150) self.assertEqual(self.widget.size(), (100,150), 'wrong size after resize') .. note:: The order in which the various tests will be run is determined by sorting the test method names with respect to the built-in ordering for strings.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c9a1e366-4682-42fc-b80f-567cf706be12
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,580
supabase-export-v2
6512db493c982812
If the start directory is the dotted name of the package, the ancestor packages can be namespace packages. .. versionchanged:: 3.14 Test discovery supports :term:`namespace package` as start directory again. To avoid scanning directories unrelated to Python, tests are not searched in subdirectories that do not contai...
trusted_official_docs
CPython Docs
If the start directory is the dotted name of the package, the ancestor packages can be namespace packages. .. versionchanged:: 3.14 Test discovery supports :term:`namespace package` as start directory again. To avoid scanning directories unrelated to Python, tests are not searched in subdirectories that do not contai...
If the start directory is the dotted name of the package, the ancestor packages can be namespace packages. .. versionchanged:: 3.14 Test discovery supports :term:`namespace package` as start directory again. To avoid scanning directories unrelated to Python, tests are not searched in subdirectories that do not contai...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cb42fb40-7f3c-486f-896e-da013d97fc2b
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,746
supabase-export-v2
09b274e28baaba0a
store the caught exception object in its :attr:`!exception` attribute. This can be useful if the intention is to perform additional checks on the exception raised:: with self.assertRaises(SomeException) as cm: do_something()
trusted_official_docs
CPython Docs
store the caught exception object in its :attr:`!exception` attribute. This can be useful if the intention is to perform additional checks on the exception raised:: with self.assertRaises(SomeException) as cm: do_something()
store the caught exception object in its :attr:`!exception` attribute. This can be useful if the intention is to perform additional checks on the exception raised:: with self.assertRaises(SomeException) as cm: do_something()
python, official-docs, cpython, P0
Local_Trusted_Corpus
cc90629f-d228-4e4f-87f1-4e2bd330c72f
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,971
supabase-export-v2
675bb364da20ee66
the tests. This allows modules to customize test loading. This is the `load_tests protocol`_. The *pattern* argument is passed as the third argument to ``load_tests``. .. versionchanged:: 3.2 Support for ``load_tests`` added.
trusted_official_docs
CPython Docs
the tests. This allows modules to customize test loading. This is the `load_tests protocol`_. The *pattern* argument is passed as the third argument to ``load_tests``. .. versionchanged:: 3.2 Support for ``load_tests`` added.
the tests. This allows modules to customize test loading. This is the `load_tests protocol`_. The *pattern* argument is passed as the third argument to ``load_tests``. .. versionchanged:: 3.2 Support for ``load_tests`` added.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cd7869a8-45ca-4dee-b178-1d5f5964b9d3
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,960
supabase-export-v2
773c79d4f72b0351
.. attribute:: errors A list of the non-fatal errors encountered while loading tests. Not reset by the loader at any point. Fatal errors are signalled by the relevant method raising an exception to the caller. Non-fatal errors are also indicated by a synthetic test that will raise the original error when run.
trusted_official_docs
CPython Docs
.. attribute:: errors A list of the non-fatal errors encountered while loading tests. Not reset by the loader at any point. Fatal errors are signalled by the relevant method raising an exception to the caller. Non-fatal errors are also indicated by a synthetic test that will raise the original error when run.
.. attribute:: errors A list of the non-fatal errors encountered while loading tests. Not reset by the loader at any point. Fatal errors are signalled by the relevant method raising an exception to the caller. Non-fatal errors are also indicated by a synthetic test that will raise the original error when run.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ce758835-5dbc-4069-b909-74d53232f0ec
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,802
supabase-export-v2
bfaf58063976a6b4
If given, *level* should be either a numeric logging level or its string equivalent (for example either ``"ERROR"`` or :const:`logging.ERROR`). The default is :const:`logging.INFO`. Unlike :meth:`assertLogs`, nothing will be returned by the context manager.
trusted_official_docs
CPython Docs
If given, *level* should be either a numeric logging level or its string equivalent (for example either ``"ERROR"`` or :const:`logging.ERROR`). The default is :const:`logging.INFO`. Unlike :meth:`assertLogs`, nothing will be returned by the context manager.
If given, *level* should be either a numeric logging level or its string equivalent (for example either ``"ERROR"`` or :const:`logging.ERROR`). The default is :const:`logging.INFO`. Unlike :meth:`assertLogs`, nothing will be returned by the context manager.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cec7844d-27f3-4ac1-a4e5-35e40bac9cef
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,669
supabase-export-v2
931322c280a8b452
5 are all even. ---------------------------------------------------------------------- Traceback (most recent call last): File "subtests.py", line 11, in test_even self.assertEqual(i % 2, 0) ^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 1 != 0 ====================================================================== FAIL: t...
trusted_official_docs
CPython Docs
5 are all even. ---------------------------------------------------------------------- Traceback (most recent call last): File "subtests.py", line 11, in test_even self.assertEqual(i % 2, 0) ^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 1 != 0 ====================================================================== FAIL: t...
5 are all even. ---------------------------------------------------------------------- Traceback (most recent call last): File "subtests.py", line 11, in test_even self.assertEqual(i % 2, 0) ^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 1 != 0 ====================================================================== FAIL: t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ced47e92-1a74-4090-bfc8-fec314ea1deb
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,137
supabase-export-v2
215b804e8d5d531f
def load_tests(loader, standard_tests, pattern): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) package_tests = loader.discover(start_dir=this_dir, pattern=pattern) standard_tests.addTests(package_tests) return standard_tests .. versionchanged:: 3.5 Discovery no longer checks pack...
trusted_official_docs
CPython Docs
def load_tests(loader, standard_tests, pattern): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) package_tests = loader.discover(start_dir=this_dir, pattern=pattern) standard_tests.addTests(package_tests) return standard_tests .. versionchanged:: 3.5 Discovery no longer checks pack...
def load_tests(loader, standard_tests, pattern): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) package_tests = loader.discover(start_dir=this_dir, pattern=pattern) standard_tests.addTests(package_tests) return standard_tests .. versionchanged:: 3.5 Discovery no longer checks pack...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cf999c31-bb09-41a6-b85d-2928ca0c7049
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,817
supabase-export-v2
40ae54b0a6b8459d
.. method:: assertRegex(text, regex, msg=None) assertNotRegex(text, regex, msg=None) Test that a *regex* search matches (or does not match) *text*. In case of failure, the error message will include the pattern and the *text* (or the pattern and the part of *text* that unexpectedly matched). *regex* may be a regular...
trusted_official_docs
CPython Docs
.. method:: assertRegex(text, regex, msg=None) assertNotRegex(text, regex, msg=None) Test that a *regex* search matches (or does not match) *text*. In case of failure, the error message will include the pattern and the *text* (or the pattern and the part of *text* that unexpectedly matched). *regex* may be a regular...
.. method:: assertRegex(text, regex, msg=None) assertNotRegex(text, regex, msg=None) Test that a *regex* search matches (or does not match) *text*. In case of failure, the error message will include the pattern and the *text* (or the pattern and the part of *text* that unexpectedly matched). *regex* may be a regular...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d0f489cf-7223-4927-9298-117938f9dcc4
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,967
supabase-export-v2
0a53ade158f3b682
.. method:: loadTestsFromModule(module, *, pattern=None) Return a suite of all test cases contained in the given module. This method searches *module* for classes derived from :class:`TestCase` and creates an instance of the class for each test method defined for the class.
trusted_official_docs
CPython Docs
.. method:: loadTestsFromModule(module, *, pattern=None) Return a suite of all test cases contained in the given module. This method searches *module* for classes derived from :class:`TestCase` and creates an instance of the class for each test method defined for the class.
.. method:: loadTestsFromModule(module, *, pattern=None) Return a suite of all test cases contained in the given module. This method searches *module* for classes derived from :class:`TestCase` and creates an instance of the class for each test method defined for the class.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d1646c05-6db5-4adf-8303-34aec49c3d63
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,965
supabase-export-v2
e85147d8e9d1243c
Return a suite of all test cases contained in the :class:`TestCase`\ -derived :class:`!testCaseClass`. A test case instance is created for each method named by :meth:`getTestCaseNames`. By default these are the method names beginning with ``test``. If :meth:`getTestCaseNames` returns no methods, but the :meth:`!runT...
trusted_official_docs
CPython Docs
Return a suite of all test cases contained in the :class:`TestCase`\ -derived :class:`!testCaseClass`. A test case instance is created for each method named by :meth:`getTestCaseNames`. By default these are the method names beginning with ``test``. If :meth:`getTestCaseNames` returns no methods, but the :meth:`!runT...
Return a suite of all test cases contained in the :class:`TestCase`\ -derived :class:`!testCaseClass`. A test case instance is created for each method named by :meth:`getTestCaseNames`. By default these are the method names beginning with ``test``. If :meth:`getTestCaseNames` returns no methods, but the :meth:`!runT...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d39649cd-0b40-4bb7-bae9-375ed77cbde3
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,102
supabase-export-v2
aa4149d4ec1ff663
.. method:: run(test) This method is the main public interface to the ``TextTestRunner``. This method takes a :class:`TestSuite` or :class:`TestCase` instance. A :class:`TestResult` is created by calling :func:`_makeResult` and the test(s) are run and the results printed to stdout.
trusted_official_docs
CPython Docs
.. method:: run(test) This method is the main public interface to the ``TextTestRunner``. This method takes a :class:`TestSuite` or :class:`TestCase` instance. A :class:`TestResult` is created by calling :func:`_makeResult` and the test(s) are run and the results printed to stdout.
.. method:: run(test) This method is the main public interface to the ``TextTestRunner``. This method takes a :class:`TestSuite` or :class:`TestCase` instance. A :class:`TestResult` is created by calling :func:`_makeResult` and the test(s) are run and the results printed to stdout.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d517c12f-8b3a-4ea6-b265-e1155f555521
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,618
supabase-export-v2
30e13f5fbd18e696
provides a :class:`FunctionTestCase` class. This subclass of :class:`TestCase` can be used to wrap an existing test function. Set-up and tear-down functions can also be provided. Given the following test function::
trusted_official_docs
CPython Docs
provides a :class:`FunctionTestCase` class. This subclass of :class:`TestCase` can be used to wrap an existing test function. Set-up and tear-down functions can also be provided. Given the following test function::
provides a :class:`FunctionTestCase` class. This subclass of :class:`TestCase` can be used to wrap an existing test function. Set-up and tear-down functions can also be provided. Given the following test function::
python, official-docs, cpython, P0
Local_Trusted_Corpus
d5e61097-0712-4702-a02c-5ad3e4b08d93
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,576
supabase-export-v2
bdf6c2fad6edcb9c
path to a directory then discover assumes that whichever location it imports from is the location you intended, so you will not get the warning. Test modules and packages can customize test loading and discovery by through the `load_tests protocol`_.
trusted_official_docs
CPython Docs
path to a directory then discover assumes that whichever location it imports from is the location you intended, so you will not get the warning. Test modules and packages can customize test loading and discovery by through the `load_tests protocol`_.
path to a directory then discover assumes that whichever location it imports from is the location you intended, so you will not get the warning. Test modules and packages can customize test loading and discovery by through the `load_tests protocol`_.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d85bfb7a-77b2-483f-b65f-b1600ae180a9
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,775
supabase-export-v2
99071de612763b66
message of the triggered warning. *regex* may be a regular expression object or a string containing a regular expression suitable for use by :func:`re.search`. Example:: self.assertWarnsRegex(DeprecationWarning, r'legacy_function\(\) is deprecated', legacy_function, 'XYZ')
trusted_official_docs
CPython Docs
message of the triggered warning. *regex* may be a regular expression object or a string containing a regular expression suitable for use by :func:`re.search`. Example:: self.assertWarnsRegex(DeprecationWarning, r'legacy_function\(\) is deprecated', legacy_function, 'XYZ')
message of the triggered warning. *regex* may be a regular expression object or a string containing a regular expression suitable for use by :func:`re.search`. Example:: self.assertWarnsRegex(DeprecationWarning, r'legacy_function\(\) is deprecated', legacy_function, 'XYZ')
python, official-docs, cpython, P0
Local_Trusted_Corpus
d8b400b2-7904-4036-b307-117a4f8cf2c5
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,098
supabase-export-v2
03de911d4b857739
.. method:: _makeResult() This method returns the instance of ``TestResult`` used by :meth:`run`. It is not intended to be called directly, but can be overridden in subclasses to provide a custom ``TestResult``.
trusted_official_docs
CPython Docs
.. method:: _makeResult() This method returns the instance of ``TestResult`` used by :meth:`run`. It is not intended to be called directly, but can be overridden in subclasses to provide a custom ``TestResult``.
.. method:: _makeResult() This method returns the instance of ``TestResult`` used by :meth:`run`. It is not intended to be called directly, but can be overridden in subclasses to provide a custom ``TestResult``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d8ed043a-ae81-41b7-9eff-cdb99f0addf0
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,866
supabase-export-v2
e9288977986bb2ca
.. attribute:: maxDiff This attribute controls the maximum length of diffs output by assert methods that report diffs on failure. It defaults to 80*8 characters. Assert methods affected by this attribute are :meth:`assertSequenceEqual` (including all the sequence comparison methods that delegate to it), :meth:`asser...
trusted_official_docs
CPython Docs
.. attribute:: maxDiff This attribute controls the maximum length of diffs output by assert methods that report diffs on failure. It defaults to 80*8 characters. Assert methods affected by this attribute are :meth:`assertSequenceEqual` (including all the sequence comparison methods that delegate to it), :meth:`asser...
.. attribute:: maxDiff This attribute controls the maximum length of diffs output by assert methods that report diffs on failure. It defaults to 80*8 characters. Assert methods affected by this attribute are :meth:`assertSequenceEqual` (including all the sequence comparison methods that delegate to it), :meth:`asser...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d964115c-73cd-4972-ba9f-e818d0659433
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,579
supabase-export-v2
b5e550df8ee86184
<namespace package>` support. It has been broken since Python 3.7. Start directory and its subdirectories containing tests must be regular package that have ``__init__.py`` file. If the start directory is the dotted name of the package, the ancestor packages can be namespace packages.
trusted_official_docs
CPython Docs
<namespace package>` support. It has been broken since Python 3.7. Start directory and its subdirectories containing tests must be regular package that have ``__init__.py`` file. If the start directory is the dotted name of the package, the ancestor packages can be namespace packages.
<namespace package>` support. It has been broken since Python 3.7. Start directory and its subdirectories containing tests must be regular package that have ``__init__.py`` file. If the start directory is the dotted name of the package, the ancestor packages can be namespace packages.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d981b3f8-3be9-4b83-bf8c-8e1c56561586
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,162
supabase-export-v2
adefd00e78bd7fce
to the order they are added (:abbr:`LIFO (last-in, first-out)`). They are called with any arguments and keyword arguments passed into :meth:`addModuleCleanup` when they are added. If :meth:`setUpModule` fails, meaning that :func:`tearDownModule` is not called, then any cleanup functions added will still be called.
trusted_official_docs
CPython Docs
to the order they are added (:abbr:`LIFO (last-in, first-out)`). They are called with any arguments and keyword arguments passed into :meth:`addModuleCleanup` when they are added. If :meth:`setUpModule` fails, meaning that :func:`tearDownModule` is not called, then any cleanup functions added will still be called.
to the order they are added (:abbr:`LIFO (last-in, first-out)`). They are called with any arguments and keyword arguments passed into :meth:`addModuleCleanup` when they are added. If :meth:`setUpModule` fails, meaning that :func:`tearDownModule` is not called, then any cleanup functions added will still be called.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d9dbbe5c-071a-4854-957f-b1fb9c13872d
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,016
supabase-export-v2
530f8cc6f065e199
This class is used to compile information about which tests have succeeded and which have failed. A :class:`TestResult` object stores the results of a set of tests. The :class:`TestCase` and :class:`TestSuite` classes ensure that results are properly recorded; test authors do not need to worry about recording the ou...
trusted_official_docs
CPython Docs
This class is used to compile information about which tests have succeeded and which have failed. A :class:`TestResult` object stores the results of a set of tests. The :class:`TestCase` and :class:`TestSuite` classes ensure that results are properly recorded; test authors do not need to worry about recording the ou...
This class is used to compile information about which tests have succeeded and which have failed. A :class:`TestResult` object stores the results of a set of tests. The :class:`TestCase` and :class:`TestSuite` classes ensure that results are properly recorded; test authors do not need to worry about recording the ou...
python, official-docs, cpython, P0
Local_Trusted_Corpus
da20e49b-1d81-49ad-815c-7ff9b1e08d62
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,571
supabase-export-v2
530bf690fba0af30
python -m unittest discover -s project_directory -p "*_test.py" python -m unittest discover project_directory "*_test.py" As well as being a path it is possible to pass a package name, for example ``myproject.subpackage.test``, as the start directory. The package name you supply will then be imported and its location o...
trusted_official_docs
CPython Docs
python -m unittest discover -s project_directory -p "*_test.py" python -m unittest discover project_directory "*_test.py" As well as being a path it is possible to pass a package name, for example ``myproject.subpackage.test``, as the start directory. The package name you supply will then be imported and its location o...
python -m unittest discover -s project_directory -p "*_test.py" python -m unittest discover project_directory "*_test.py" As well as being a path it is possible to pass a package name, for example ``myproject.subpackage.test``, as the start directory. The package name you supply will then be imported and its location o...
python, official-docs, cpython, P0
Local_Trusted_Corpus
db1696d1-43b3-4225-90fe-31fd2334ceb8
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,710
supabase-export-v2
8b485f524c622c88
.. _assert-methods: The :class:`TestCase` class provides several assert methods to check for and report failures. The following table lists the most commonly used methods (see the tables below for more assert methods):
trusted_official_docs
CPython Docs
.. _assert-methods: The :class:`TestCase` class provides several assert methods to check for and report failures. The following table lists the most commonly used methods (see the tables below for more assert methods):
.. _assert-methods: The :class:`TestCase` class provides several assert methods to check for and report failures. The following table lists the most commonly used methods (see the tables below for more assert methods):
python, official-docs, cpython, P0
Local_Trusted_Corpus
dc8db845-fb04-43ab-8e3b-4018a29953ae
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,705
supabase-export-v2
f8cf823832b25932
code block as a subtest. *msg* and *params* are optional, arbitrary values which are displayed whenever a subtest fails, allowing you to identify them clearly. A test case can contain any number of subtest declarations, and they can be arbitrarily nested.
trusted_official_docs
CPython Docs
code block as a subtest. *msg* and *params* are optional, arbitrary values which are displayed whenever a subtest fails, allowing you to identify them clearly. A test case can contain any number of subtest declarations, and they can be arbitrarily nested.
code block as a subtest. *msg* and *params* are optional, arbitrary values which are displayed whenever a subtest fails, allowing you to identify them clearly. A test case can contain any number of subtest declarations, and they can be arbitrarily nested.
python, official-docs, cpython, P0
Local_Trusted_Corpus
dcb36a20-feb3-43b5-a2f0-15f787acf10a
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,490
supabase-export-v2
91948724862411fc
`Testing in Python Mailing List <http://lists.idyll.org/listinfo/testing-in-python>`_ A special-interest-group for discussion of testing, and testing tools, in Python. The script :file:`Tools/unittestgui/unittestgui.py` in the Python source distribution is a GUI tool for test discovery and execution. This is intended ...
trusted_official_docs
CPython Docs
`Testing in Python Mailing List <http://lists.idyll.org/listinfo/testing-in-python>`_ A special-interest-group for discussion of testing, and testing tools, in Python. The script :file:`Tools/unittestgui/unittestgui.py` in the Python source distribution is a GUI tool for test discovery and execution. This is intended ...
`Testing in Python Mailing List <http://lists.idyll.org/listinfo/testing-in-python>`_ A special-interest-group for discussion of testing, and testing tools, in Python. The script :file:`Tools/unittestgui/unittestgui.py` in the Python source distribution is a GUI tool for test discovery and execution. This is intended ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
dd20a1fb-df34-4664-bfab-37836a9114e5
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,784
supabase-export-v2
b9be8e60cf19e357
.. method:: assertLogs(logger=None, level=None, formatter=None) A context manager to test that at least one message is logged on the *logger* or one of its children, with at least the given *level*.
trusted_official_docs
CPython Docs
.. method:: assertLogs(logger=None, level=None, formatter=None) A context manager to test that at least one message is logged on the *logger* or one of its children, with at least the given *level*.
.. method:: assertLogs(logger=None, level=None, formatter=None) A context manager to test that at least one message is logged on the *logger* or one of its children, with at least the given *level*.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ddcd346b-93c0-476c-8e30-6eeb428fd165
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,135
supabase-export-v2
52965d734bb20636
This should return a :class:`TestSuite` representing all the tests from the package. (``standard_tests`` will only contain tests collected from :file:`__init__.py`.) Because the pattern is passed into ``load_tests`` the package is free to continue (and potentially modify) test discovery. A 'do nothing' ``load_tests`` f...
trusted_official_docs
CPython Docs
This should return a :class:`TestSuite` representing all the tests from the package. (``standard_tests`` will only contain tests collected from :file:`__init__.py`.) Because the pattern is passed into ``load_tests`` the package is free to continue (and potentially modify) test discovery. A 'do nothing' ``load_tests`` f...
This should return a :class:`TestSuite` representing all the tests from the package. (``standard_tests`` will only contain tests collected from :file:`__init__.py`.) Because the pattern is passed into ``load_tests`` the package is free to continue (and potentially modify) test discovery. A 'do nothing' ``load_tests`` f...
python, official-docs, cpython, P0
Local_Trusted_Corpus
df884cfc-9caf-4fdd-8c9e-8cd639cd47f4
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,520
supabase-export-v2
972911f1673a6f15
python -m unittest tests/test_something.py This allows you to use the shell filename completion to specify the test module. The file specified must still be importable as a module. The path is converted to a module name by removing the '.py' and converting path separators into '.'. If you want to execute a test file th...
trusted_official_docs
CPython Docs
python -m unittest tests/test_something.py This allows you to use the shell filename completion to specify the test module. The file specified must still be importable as a module. The path is converted to a module name by removing the '.py' and converting path separators into '.'. If you want to execute a test file th...
python -m unittest tests/test_something.py This allows you to use the shell filename completion to specify the test module. The file specified must still be importable as a module. The path is converted to a module name by removing the '.py' and converting path separators into '.'. If you want to execute a test file th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e01a1560-3ad1-47b7-9de0-e3306295549b
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,827
supabase-export-v2
d8c47a669e842af2
.. method:: assertEndsWith(s, suffix, msg=None) .. method:: assertNotEndsWith(s, suffix, msg=None) Test that the Unicode or byte string *s* ends (or does not end) with a *suffix*. *suffix* can also be a tuple of strings to try.
trusted_official_docs
CPython Docs
.. method:: assertEndsWith(s, suffix, msg=None) .. method:: assertNotEndsWith(s, suffix, msg=None) Test that the Unicode or byte string *s* ends (or does not end) with a *suffix*. *suffix* can also be a tuple of strings to try.
.. method:: assertEndsWith(s, suffix, msg=None) .. method:: assertNotEndsWith(s, suffix, msg=None) Test that the Unicode or byte string *s* ends (or does not end) with a *suffix*. *suffix* can also be a tuple of strings to try.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e1315026-3ec7-472a-924b-6d2adf7bc7b2
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,663
supabase-export-v2
acb47a9a7e21ee10
.. versionadded:: 3.4 When there are very small differences among your tests, for instance some parameters, unittest allows you to distinguish them inside the body of a test method using the :meth:`~TestCase.subTest` context manager.
trusted_official_docs
CPython Docs
.. versionadded:: 3.4 When there are very small differences among your tests, for instance some parameters, unittest allows you to distinguish them inside the body of a test method using the :meth:`~TestCase.subTest` context manager.
.. versionadded:: 3.4 When there are very small differences among your tests, for instance some parameters, unittest allows you to distinguish them inside the body of a test method using the :meth:`~TestCase.subTest` context manager.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e184cb7a-8226-4284-82f1-359998334a31
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,569
supabase-export-v2
2d5a338b2e9b1168
Top level directory of project (defaults to start directory) The :option:`-s`, :option:`-p`, and :option:`-t` options can be passed in as positional arguments in that order. The following two command lines are equivalent::
trusted_official_docs
CPython Docs
Top level directory of project (defaults to start directory) The :option:`-s`, :option:`-p`, and :option:`-t` options can be passed in as positional arguments in that order. The following two command lines are equivalent::
Top level directory of project (defaults to start directory) The :option:`-s`, :option:`-p`, and :option:`-t` options can be passed in as positional arguments in that order. The following two command lines are equivalent::
python, official-docs, cpython, P0
Local_Trusted_Corpus
e22e7947-3102-4e28-a56b-1115035449dd
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,900
supabase-export-v2
2eb1c938e4813cc1
This method is called unconditionally after :meth:`tearDownClass`, or after :meth:`setUpClass` if :meth:`setUpClass` raises an exception. It is responsible for calling all the cleanup functions added by :meth:`addClassCleanup`. If you need cleanup functions to be called *prior* to :meth:`tearDownClass` then you can c...
trusted_official_docs
CPython Docs
This method is called unconditionally after :meth:`tearDownClass`, or after :meth:`setUpClass` if :meth:`setUpClass` raises an exception. It is responsible for calling all the cleanup functions added by :meth:`addClassCleanup`. If you need cleanup functions to be called *prior* to :meth:`tearDownClass` then you can c...
This method is called unconditionally after :meth:`tearDownClass`, or after :meth:`setUpClass` if :meth:`setUpClass` raises an exception. It is responsible for calling all the cleanup functions added by :meth:`addClassCleanup`. If you need cleanup functions to be called *prior* to :meth:`tearDownClass` then you can c...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e240c21b-35b6-4114-8783-5b530822231e
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,606
supabase-export-v2
799189d962b45737
if __name__ == '__main__': runner = unittest.TextTestRunner() runner.run(suite()) You can place the definitions of test cases and test suites in the same modules as the code they are to test (such as :file:`widget.py`), but there are several advantages to placing the test code in a separate module, such as :file:`test_...
trusted_official_docs
CPython Docs
if __name__ == '__main__': runner = unittest.TextTestRunner() runner.run(suite()) You can place the definitions of test cases and test suites in the same modules as the code they are to test (such as :file:`widget.py`), but there are several advantages to placing the test code in a separate module, such as :file:`test_...
if __name__ == '__main__': runner = unittest.TextTestRunner() runner.run(suite()) You can place the definitions of test cases and test suites in the same modules as the code they are to test (such as :file:`widget.py`), but there are several advantages to placing the test code in a separate module, such as :file:`test_...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e32f93ef-d134-4e89-bbda-b8dada25bbb8
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,807
supabase-export-v2
40c66251944971a8
| 3.14 | | <TestCase.assertHasAttr>` | | | +---------------------------------------+--------------------------------+--------------+ | :meth:`assertNotHasAttr(a, b) | ``not hastattr(a, b)`` | 3.14 | | <TestCase.assertNotHasAttr>` | | | +---------------------------------------+--------------------------------+----------...
trusted_official_docs
CPython Docs
| 3.14 | | <TestCase.assertHasAttr>` | | | +---------------------------------------+--------------------------------+--------------+ | :meth:`assertNotHasAttr(a, b) | ``not hastattr(a, b)`` | 3.14 | | <TestCase.assertNotHasAttr>` | | | +---------------------------------------+--------------------------------+----------...
| 3.14 | | <TestCase.assertHasAttr>` | | | +---------------------------------------+--------------------------------+--------------+ | :meth:`assertNotHasAttr(a, b) | ``not hastattr(a, b)`` | 3.14 | | <TestCase.assertNotHasAttr>` | | | +---------------------------------------+--------------------------------+----------...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e3412f52-99d5-433b-9062-0ae56ae39a7a
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,988
supabase-export-v2
3a8b3c21926e7849
and discovery will continue. If the import failure is due to :exc:`SkipTest` being raised, it will be recorded as a skip instead of an error. If a package (a directory containing a file named :file:`__init__.py`) is found, the package will be checked for a ``load_tests`` function. If this exists then it will be calle...
trusted_official_docs
CPython Docs
and discovery will continue. If the import failure is due to :exc:`SkipTest` being raised, it will be recorded as a skip instead of an error. If a package (a directory containing a file named :file:`__init__.py`) is found, the package will be checked for a ``load_tests`` function. If this exists then it will be calle...
and discovery will continue. If the import failure is due to :exc:`SkipTest` being raised, it will be recorded as a skip instead of an error. If a package (a directory containing a file named :file:`__init__.py`) is found, the package will be checked for a ``load_tests`` function. If this exists then it will be calle...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e616b51a-ef7f-43f3-a74d-5976fb4bcd67
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,113
supabase-export-v2
5cb26ea36297a85c
``main`` supports being used from the interactive interpreter by passing in the argument ``exit=False``. This displays the result on standard output without calling :func:`sys.exit`:: >>> from unittest import main >>> main(module='test_module', exit=False)
trusted_official_docs
CPython Docs
``main`` supports being used from the interactive interpreter by passing in the argument ``exit=False``. This displays the result on standard output without calling :func:`sys.exit`:: >>> from unittest import main >>> main(module='test_module', exit=False)
``main`` supports being used from the interactive interpreter by passing in the argument ``exit=False``. This displays the result on standard output without calling :func:`sys.exit`:: >>> from unittest import main >>> main(module='test_module', exit=False)
python, official-docs, cpython, P0
Local_Trusted_Corpus
e6679448-fa4d-4a28-9f5e-3a07327155c4
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,739
supabase-export-v2
b02a5cc0fda1d0e7
It is also possible to check the production of exceptions, warnings, and log messages using the following methods: +---------------------------------------------------------+--------------------------------------+------------+ | Method | Checks that | New in | +========================================================...
trusted_official_docs
CPython Docs
It is also possible to check the production of exceptions, warnings, and log messages using the following methods: +---------------------------------------------------------+--------------------------------------+------------+ | Method | Checks that | New in | +========================================================...
It is also possible to check the production of exceptions, warnings, and log messages using the following methods: +---------------------------------------------------------+--------------------------------------+------------+ | Method | Checks that | New in | +========================================================...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e84242b6-f66f-4152-82b2-5ac979979c13
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,143
supabase-export-v2
e4ebdfbe3e69ddaa
Note that shared fixtures do not play well with [potential] features like test parallelization and they break test isolation. They should be used with care. The default ordering of tests created by the unittest test loaders is to group all tests from the same modules and classes together. This will lead to ``setUpClass...
trusted_official_docs
CPython Docs
Note that shared fixtures do not play well with [potential] features like test parallelization and they break test isolation. They should be used with care. The default ordering of tests created by the unittest test loaders is to group all tests from the same modules and classes together. This will lead to ``setUpClass...
Note that shared fixtures do not play well with [potential] features like test parallelization and they break test isolation. They should be used with care. The default ordering of tests created by the unittest test loaders is to group all tests from the same modules and classes together. This will lead to ``setUpClass...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e84eff63-da9c-4d0a-8e3a-21e92147073f
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,820
supabase-export-v2
d3199d1edf7d55e5
.. method:: assertCountEqual(first, second, msg=None) Test that sequence *first* contains the same elements as *second*, regardless of their order. When they don't, an error message listing the differences between the sequences will be generated.
trusted_official_docs
CPython Docs
.. method:: assertCountEqual(first, second, msg=None) Test that sequence *first* contains the same elements as *second*, regardless of their order. When they don't, an error message listing the differences between the sequences will be generated.
.. method:: assertCountEqual(first, second, msg=None) Test that sequence *first* contains the same elements as *second*, regardless of their order. When they don't, an error message listing the differences between the sequences will be generated.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ea543903-5aea-45b4-992d-909c03698534
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,806
supabase-export-v2
d73ce8f27cd43668
| :meth:`assertCountEqual(a, b) | *a* contains the same elements | 3.2 | | <TestCase.assertCountEqual>` | as *b*, regardless of their | | | | order. | | +---------------------------------------+--------------------------------+--------------+ | :meth:`assertStartsWith(a, b) | ``a.startswith(b)`` | 3.14 | | <TestCase...
trusted_official_docs
CPython Docs
| :meth:`assertCountEqual(a, b) | *a* contains the same elements | 3.2 | | <TestCase.assertCountEqual>` | as *b*, regardless of their | | | | order. | | +---------------------------------------+--------------------------------+--------------+ | :meth:`assertStartsWith(a, b) | ``a.startswith(b)`` | 3.14 | | <TestCase...
| :meth:`assertCountEqual(a, b) | *a* contains the same elements | 3.2 | | <TestCase.assertCountEqual>` | as *b*, regardless of their | | | | order. | | +---------------------------------------+--------------------------------+--------------+ | :meth:`assertStartsWith(a, b) | ``a.startswith(b)`` | 3.14 | | <TestCase...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ebdb4109-5c7b-4bf3-992f-694497fe7426
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,482
supabase-export-v2
a69bdabb4064ca5a
for a specific response to a particular set of inputs. :mod:`!unittest` provides a base class, :class:`TestCase`, which may be used to create new test cases. test suite A :dfn:`test suite` is a collection of test cases, test suites, or both. It is used to aggregate tests that should be executed together.
trusted_official_docs
CPython Docs
for a specific response to a particular set of inputs. :mod:`!unittest` provides a base class, :class:`TestCase`, which may be used to create new test cases. test suite A :dfn:`test suite` is a collection of test cases, test suites, or both. It is used to aggregate tests that should be executed together.
for a specific response to a particular set of inputs. :mod:`!unittest` provides a base class, :class:`TestCase`, which may be used to create new test cases. test suite A :dfn:`test suite` is a collection of test cases, test suites, or both. It is used to aggregate tests that should be executed together.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ec0d8278-080d-4438-8dab-156aa996681c
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,588
supabase-export-v2
7b21a8b08b72843b
class DefaultWidgetSizeTestCase(unittest.TestCase): def test_default_widget_size(self): widget = Widget('The widget') self.assertEqual(widget.size(), (50, 50)) Note that in order to test something, we use one of the :ref:`assert\* methods <assert-methods>` provided by the :class:`TestCase` base class. If the test fails...
trusted_official_docs
CPython Docs
class DefaultWidgetSizeTestCase(unittest.TestCase): def test_default_widget_size(self): widget = Widget('The widget') self.assertEqual(widget.size(), (50, 50)) Note that in order to test something, we use one of the :ref:`assert\* methods <assert-methods>` provided by the :class:`TestCase` base class. If the test fails...
class DefaultWidgetSizeTestCase(unittest.TestCase): def test_default_widget_size(self): widget = Widget('The widget') self.assertEqual(widget.size(), (50, 50)) Note that in order to test something, we use one of the :ref:`assert\* methods <assert-methods>` provided by the :class:`TestCase` base class. If the test fails...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ed838268-4516-40ea-9cdf-66d84996f715
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,090
supabase-export-v2
2b96b19b4f253bee
:class:`TestLoader` class intended to be shared. If no customization of the :class:`TestLoader` is needed, this instance can be used instead of repeatedly creating new instances. .. class:: TextTestRunner(stream=None, descriptions=True, verbosity=1, failfast=False, \ buffer=False, resultclass=None, warnings=None, *, \...
trusted_official_docs
CPython Docs
:class:`TestLoader` class intended to be shared. If no customization of the :class:`TestLoader` is needed, this instance can be used instead of repeatedly creating new instances. .. class:: TextTestRunner(stream=None, descriptions=True, verbosity=1, failfast=False, \ buffer=False, resultclass=None, warnings=None, *, \...
:class:`TestLoader` class intended to be shared. If no customization of the :class:`TestLoader` is needed, this instance can be used instead of repeatedly creating new instances. .. class:: TextTestRunner(stream=None, descriptions=True, verbosity=1, failfast=False, \ buffer=False, resultclass=None, warnings=None, *, \...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ee34f37f-db41-423a-9a50-aba504a5bf06
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,821
supabase-export-v2
591cf90a680aaf16
contains the same elements as *second*, regardless of their order. When they don't, an error message listing the differences between the sequences will be generated. Duplicate elements are *not* ignored when comparing *first* and *second*. It verifies whether each element has the same count in both sequences. Equival...
trusted_official_docs
CPython Docs
contains the same elements as *second*, regardless of their order. When they don't, an error message listing the differences between the sequences will be generated. Duplicate elements are *not* ignored when comparing *first* and *second*. It verifies whether each element has the same count in both sequences. Equival...
contains the same elements as *second*, regardless of their order. When they don't, an error message listing the differences between the sequences will be generated. Duplicate elements are *not* ignored when comparing *first* and *second*. It verifies whether each element has the same count in both sequences. Equival...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f12e6910-53ec-4ad1-bf08-567cce81a9f9
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,560
supabase-export-v2
958aaeab1ef553f5
unittest`` is the equivalent of ``python -m unittest discover``. If you want to pass arguments to test discovery the ``discover`` sub-command must be used explicitly. The ``discover`` sub-command has the following options:
trusted_official_docs
CPython Docs
unittest`` is the equivalent of ``python -m unittest discover``. If you want to pass arguments to test discovery the ``discover`` sub-command must be used explicitly. The ``discover`` sub-command has the following options:
unittest`` is the equivalent of ``python -m unittest discover``. If you want to pass arguments to test discovery the ``discover`` sub-command must be used explicitly. The ``discover`` sub-command has the following options:
python, official-docs, cpython, P0
Local_Trusted_Corpus
f2b84aeb-7374-44b1-8355-ba1723f4a214
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,602
supabase-export-v2
df1148b3e1c1901d
is created as a unique test fixture used to execute each individual test method. Thus :meth:`~TestCase.setUp`, :meth:`~TestCase.tearDown`, and :meth:`!TestCase.__init__` will be called once per test. It is recommended that you use TestCase implementations to group tests together according to the features they test. :mo...
trusted_official_docs
CPython Docs
is created as a unique test fixture used to execute each individual test method. Thus :meth:`~TestCase.setUp`, :meth:`~TestCase.tearDown`, and :meth:`!TestCase.__init__` will be called once per test. It is recommended that you use TestCase implementations to group tests together according to the features they test. :mo...
is created as a unique test fixture used to execute each individual test method. Thus :meth:`~TestCase.setUp`, :meth:`~TestCase.tearDown`, and :meth:`!TestCase.__init__` will be called once per test. It is recommended that you use TestCase implementations to group tests together according to the features they test. :mo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f49f1d10-145f-4e03-901a-170bac198216
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,688
supabase-export-v2
b242678ae1ab66c8
.. method:: setUpClass() A class method called before tests in an individual class are run. ``setUpClass`` is called with the class as the only argument and must be decorated as a :func:`classmethod`::
trusted_official_docs
CPython Docs
.. method:: setUpClass() A class method called before tests in an individual class are run. ``setUpClass`` is called with the class as the only argument and must be decorated as a :func:`classmethod`::
.. method:: setUpClass() A class method called before tests in an individual class are run. ``setUpClass`` is called with the class as the only argument and must be decorated as a :func:`classmethod`::
python, official-docs, cpython, P0
Local_Trusted_Corpus
f7301617-7b9c-4023-afbf-a18ec5eae11d
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,912
supabase-export-v2
a01aafeb0a0dc358
reported errors). This method will only be called if the :meth:`asyncSetUp` succeeds, regardless of the outcome of the test method. The default implementation does nothing. .. method:: addAsyncCleanup(function, /, *args, **kwargs)
trusted_official_docs
CPython Docs
reported errors). This method will only be called if the :meth:`asyncSetUp` succeeds, regardless of the outcome of the test method. The default implementation does nothing. .. method:: addAsyncCleanup(function, /, *args, **kwargs)
reported errors). This method will only be called if the :meth:`asyncSetUp` succeeds, regardless of the outcome of the test method. The default implementation does nothing. .. method:: addAsyncCleanup(function, /, *args, **kwargs)
python, official-docs, cpython, P0
Local_Trusted_Corpus
f74e2965-0a5b-40b5-9caf-f38871b25f16
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,521
supabase-export-v2
2f3919f91d92a020
path separators into '.'. If you want to execute a test file that isn't importable as a module you should execute the file directly instead. You can run tests with more detail (higher verbosity) by passing in the -v flag::
trusted_official_docs
CPython Docs
path separators into '.'. If you want to execute a test file that isn't importable as a module you should execute the file directly instead. You can run tests with more detail (higher verbosity) by passing in the -v flag::
path separators into '.'. If you want to execute a test file that isn't importable as a module you should execute the file directly instead. You can run tests with more detail (higher verbosity) by passing in the -v flag::
python, official-docs, cpython, P0
Local_Trusted_Corpus
f7ec3490-70ad-4009-9fad-c72ddbaf9328
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,573
supabase-export-v2
0137823b4079fabc
.. caution:: Test discovery loads tests by importing them. Once test discovery has found all the test files from the start directory you specify it turns the paths into package names to import. For example :file:`foo/bar/baz.py` will be imported as ``foo.bar.baz``.
trusted_official_docs
CPython Docs
.. caution:: Test discovery loads tests by importing them. Once test discovery has found all the test files from the start directory you specify it turns the paths into package names to import. For example :file:`foo/bar/baz.py` will be imported as ``foo.bar.baz``.
.. caution:: Test discovery loads tests by importing them. Once test discovery has found all the test files from the start directory you specify it turns the paths into package names to import. For example :file:`foo/bar/baz.py` will be imported as ``foo.bar.baz``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f98e4645-5250-4487-9fd0-5c197e73fefa
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,159
supabase-export-v2
9a7239083220add9
not be run. If the exception is a :exc:`SkipTest` exception then the module will be reported as having been skipped instead of as an error. To add cleanup code that must be run even in the case of an exception, use ``addModuleCleanup``:
trusted_official_docs
CPython Docs
not be run. If the exception is a :exc:`SkipTest` exception then the module will be reported as having been skipped instead of as an error. To add cleanup code that must be run even in the case of an exception, use ``addModuleCleanup``:
not be run. If the exception is a :exc:`SkipTest` exception then the module will be reported as having been skipped instead of as an error. To add cleanup code that must be run even in the case of an exception, use ``addModuleCleanup``:
python, official-docs, cpython, P0
Local_Trusted_Corpus
faadf3c5-96f2-4a22-b6a5-663dec2b1775
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,874
supabase-export-v2
ac9b542736689871
of the test result class that should be used for this test case class (if no other result instance is provided to the :meth:`run` method). For :class:`TestCase` instances, this will always be an instance of :class:`TestResult`; subclasses of :class:`TestCase` should override this as necessary.
trusted_official_docs
CPython Docs
of the test result class that should be used for this test case class (if no other result instance is provided to the :meth:`run` method). For :class:`TestCase` instances, this will always be an instance of :class:`TestResult`; subclasses of :class:`TestCase` should override this as necessary.
of the test result class that should be used for this test case class (if no other result instance is provided to the :meth:`run` method). For :class:`TestCase` instances, this will always be an instance of :class:`TestResult`; subclasses of :class:`TestCase` should override this as necessary.
python, official-docs, cpython, P0
Local_Trusted_Corpus
fc955a0d-ae16-4af7-ab44-991d934ff85c
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,487
supabase-export-v2
ad41a7ee688ee982
`Simple Smalltalk Testing: With Patterns <https://web.archive.org/web/20150315073817/http://www.xprogramming.com/testfram.htm>`_ Kent Beck's original paper on testing frameworks using the pattern shared by :mod:`!unittest`. `pytest <https://docs.pytest.org/>`_ Third-party unittest framework with a lighter-weight synta...
trusted_official_docs
CPython Docs
`Simple Smalltalk Testing: With Patterns <https://web.archive.org/web/20150315073817/http://www.xprogramming.com/testfram.htm>`_ Kent Beck's original paper on testing frameworks using the pattern shared by :mod:`!unittest`. `pytest <https://docs.pytest.org/>`_ Third-party unittest framework with a lighter-weight synta...
`Simple Smalltalk Testing: With Patterns <https://web.archive.org/web/20150315073817/http://www.xprogramming.com/testfram.htm>`_ Kent Beck's original paper on testing frameworks using the pattern shared by :mod:`!unittest`. `pytest <https://docs.pytest.org/>`_ Third-party unittest framework with a lighter-weight synta...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fcac3e7d-2e1b-4820-9b9c-063dbfb09816
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,880
supabase-export-v2
2f2425ec7e5cea65
the presence of a docstring. This caused compatibility issues with unittest extensions and adding the test name was moved to the :class:`TextTestResult` in Python 3.2. .. method:: addCleanup(function, /, *args, **kwargs)
trusted_official_docs
CPython Docs
the presence of a docstring. This caused compatibility issues with unittest extensions and adding the test name was moved to the :class:`TextTestResult` in Python 3.2. .. method:: addCleanup(function, /, *args, **kwargs)
the presence of a docstring. This caused compatibility issues with unittest extensions and adding the test name was moved to the :class:`TextTestResult` in Python 3.2. .. method:: addCleanup(function, /, *args, **kwargs)
python, official-docs, cpython, P0
Local_Trusted_Corpus
fd88361e-5df6-4592-8d0e-813def407dc3
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,099
supabase-export-v2
7e8a39dd7603539b
instance of ``TestResult`` used by :meth:`run`. It is not intended to be called directly, but can be overridden in subclasses to provide a custom ``TestResult``. ``_makeResult()`` instantiates the class or callable passed in the ``TextTestRunner`` constructor as the ``resultclass`` argument. It defaults to :class:`Te...
trusted_official_docs
CPython Docs
instance of ``TestResult`` used by :meth:`run`. It is not intended to be called directly, but can be overridden in subclasses to provide a custom ``TestResult``. ``_makeResult()`` instantiates the class or callable passed in the ``TextTestRunner`` constructor as the ``resultclass`` argument. It defaults to :class:`Te...
instance of ``TestResult`` used by :meth:`run`. It is not intended to be called directly, but can be overridden in subclasses to provide a custom ``TestResult``. ``_makeResult()`` instantiates the class or callable passed in the ``TextTestRunner`` constructor as the ``resultclass`` argument. It defaults to :class:`Te...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fe7c6aa1-9384-4cbe-9afb-981068fed9ee
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,613
supabase-export-v2
a7e2a19afd93ebd7
* Tests for modules written in C must be in separate modules anyway, so why not be consistent? * If the testing strategy changes, there is no need to change the source code.
trusted_official_docs
CPython Docs
* Tests for modules written in C must be in separate modules anyway, so why not be consistent? * If the testing strategy changes, there is no need to change the source code.
* Tests for modules written in C must be in separate modules anyway, so why not be consistent? * If the testing strategy changes, there is no need to change the source code.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0727d583-36cf-4c6c-8b31-aef34e373fdf
CPython Docs
file://datasets/cpython/Doc/library/email.parser.rst
unknown
db56978b-bb94-4b30-ab5f-f2d135620659
42,216
supabase-export-v2
c9b3204d46368603
Create a :class:`BytesParser` instance. The *_class* and *policy* arguments have the same meaning and semantics as the *_factory* and *policy* arguments of :class:`BytesFeedParser`. Note: **The policy keyword should always be specified**; The default will change to :data:`email.policy.default` in a future version of P...
trusted_official_docs
CPython Docs
Create a :class:`BytesParser` instance. The *_class* and *policy* arguments have the same meaning and semantics as the *_factory* and *policy* arguments of :class:`BytesFeedParser`. Note: **The policy keyword should always be specified**; The default will change to :data:`email.policy.default` in a future version of P...
Create a :class:`BytesParser` instance. The *_class* and *policy* arguments have the same meaning and semantics as the *_factory* and *policy* arguments of :class:`BytesFeedParser`. Note: **The policy keyword should always be specified**; The default will change to :data:`email.policy.default` in a future version of P...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0f684138-7b97-4bff-8be0-e9ef77b6684b
CPython Docs
file://datasets/cpython/Doc/library/email.parser.rst
unknown
db56978b-bb94-4b30-ab5f-f2d135620659
42,253
supabase-export-v2
376339982cc30978
message object structure tree from an open :term:`file object`. This is equivalent to ``Parser().parse(fp)``. *_class* and *policy* are interpreted as with the :class:`~email.parser.Parser` class constructor. .. versionchanged:: 3.3 Removed the *strict* argument. Added the *policy* keyword. .. versionchanged:: 3.6 *_c...
trusted_official_docs
CPython Docs
message object structure tree from an open :term:`file object`. This is equivalent to ``Parser().parse(fp)``. *_class* and *policy* are interpreted as with the :class:`~email.parser.Parser` class constructor. .. versionchanged:: 3.3 Removed the *strict* argument. Added the *policy* keyword. .. versionchanged:: 3.6 *_c...
message object structure tree from an open :term:`file object`. This is equivalent to ``Parser().parse(fp)``. *_class* and *policy* are interpreted as with the :class:`~email.parser.Parser` class constructor. .. versionchanged:: 3.3 Removed the *strict* argument. Added the *policy* keyword. .. versionchanged:: 3.6 *_c...
python, official-docs, cpython, P0
Local_Trusted_Corpus
13020d85-d4c8-4382-9c81-49e4ebaff1b2
CPython Docs
file://datasets/cpython/Doc/library/email.parser.rst
unknown
db56978b-bb94-4b30-ab5f-f2d135620659
42,200
supabase-export-v2
142dd992613c0849
.. class:: BytesFeedParser(_factory=None, *, policy=policy.compat32) Create a :class:`BytesFeedParser` instance. Optional *_factory* is a no-argument callable; if not specified use the :attr:`~email.policy.Policy.message_factory` from the *policy*. Call *_factory* whenever a new message object is needed.
trusted_official_docs
CPython Docs
.. class:: BytesFeedParser(_factory=None, *, policy=policy.compat32) Create a :class:`BytesFeedParser` instance. Optional *_factory* is a no-argument callable; if not specified use the :attr:`~email.policy.Policy.message_factory` from the *policy*. Call *_factory* whenever a new message object is needed.
.. class:: BytesFeedParser(_factory=None, *, policy=policy.compat32) Create a :class:`BytesFeedParser` instance. Optional *_factory* is a no-argument callable; if not specified use the :attr:`~email.policy.Policy.message_factory` from the *policy*. Call *_factory* whenever a new message object is needed.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1837191d-7699-42e5-901f-c8b0178e5971
CPython Docs
file://datasets/cpython/Doc/library/email.parser.rst
unknown
db56978b-bb94-4b30-ab5f-f2d135620659
42,221
supabase-export-v2
ec3f9d997fbc5bd9
a blank line. Following the header block is the body of the message (which may contain MIME-encoded subparts, including subparts with a :mailheader:`Content-Transfer-Encoding` of ``8bit``). Optional *headersonly* is a flag specifying whether to stop parsing after reading the headers or not. The default is ``False``, m...
trusted_official_docs
CPython Docs
a blank line. Following the header block is the body of the message (which may contain MIME-encoded subparts, including subparts with a :mailheader:`Content-Transfer-Encoding` of ``8bit``). Optional *headersonly* is a flag specifying whether to stop parsing after reading the headers or not. The default is ``False``, m...
a blank line. Following the header block is the body of the message (which may contain MIME-encoded subparts, including subparts with a :mailheader:`Content-Transfer-Encoding` of ``8bit``). Optional *headersonly* is a flag specifying whether to stop parsing after reading the headers or not. The default is ``False``, m...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1f84143e-0578-4341-be19-e04c2c4d0a91
CPython Docs
file://datasets/cpython/Doc/library/email.parser.rst
unknown
db56978b-bb94-4b30-ab5f-f2d135620659
42,202
supabase-export-v2
97380dcaec1ed47a
as the default factory. All other policies provide :class:`~email.message.EmailMessage` as the default *_factory*. For more information on what else *policy* controls, see the :mod:`~email.policy` documentation. Note: **The policy keyword should always be specified**; The default will change to :data:`email.policy.def...
trusted_official_docs
CPython Docs
as the default factory. All other policies provide :class:`~email.message.EmailMessage` as the default *_factory*. For more information on what else *policy* controls, see the :mod:`~email.policy` documentation. Note: **The policy keyword should always be specified**; The default will change to :data:`email.policy.def...
as the default factory. All other policies provide :class:`~email.message.EmailMessage` as the default *_factory*. For more information on what else *policy* controls, see the :mod:`~email.policy` documentation. Note: **The policy keyword should always be specified**; The default will change to :data:`email.policy.def...
python, official-docs, cpython, P0
Local_Trusted_Corpus
226f8e7f-74b1-4120-89a0-2ba65efd9a58
CPython Docs
file://datasets/cpython/Doc/library/email.parser.rst
unknown
db56978b-bb94-4b30-ab5f-f2d135620659
42,192
supabase-export-v2
bf919a051f8c8c4b
the dictionary interface, and adding payload(s) using :meth:`~email.message.EmailMessage.set_content` and related methods, or they can be created by parsing a serialized representation of the email message. The :mod:`email` package provides a standard parser that understands most email document structures, including MI...
trusted_official_docs
CPython Docs
the dictionary interface, and adding payload(s) using :meth:`~email.message.EmailMessage.set_content` and related methods, or they can be created by parsing a serialized representation of the email message. The :mod:`email` package provides a standard parser that understands most email document structures, including MI...
the dictionary interface, and adding payload(s) using :meth:`~email.message.EmailMessage.set_content` and related methods, or they can be created by parsing a serialized representation of the email message. The :mod:`email` package provides a standard parser that understands most email document structures, including MI...
python, official-docs, cpython, P0
Local_Trusted_Corpus
26781bb3-416f-4e4d-9abe-5da9f177b675
CPython Docs
file://datasets/cpython/Doc/library/email.parser.rst
unknown
db56978b-bb94-4b30-ab5f-f2d135620659
42,201
supabase-export-v2
802a8c2440e5b084
instance. Optional *_factory* is a no-argument callable; if not specified use the :attr:`~email.policy.Policy.message_factory` from the *policy*. Call *_factory* whenever a new message object is needed. If *policy* is specified use the rules it specifies to update the representation of the message. If *policy* is not ...
trusted_official_docs
CPython Docs
instance. Optional *_factory* is a no-argument callable; if not specified use the :attr:`~email.policy.Policy.message_factory` from the *policy*. Call *_factory* whenever a new message object is needed. If *policy* is specified use the rules it specifies to update the representation of the message. If *policy* is not ...
instance. Optional *_factory* is a no-argument callable; if not specified use the :attr:`~email.policy.Policy.message_factory` from the *policy*. Call *_factory* whenever a new message object is needed. If *policy* is specified use the rules it specifies to update the representation of the message. If *policy* is not ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2c1b23f9-5766-4c58-ab0a-6cb096b5e443
CPython Docs
file://datasets/cpython/Doc/library/email.parser.rst
unknown
db56978b-bb94-4b30-ab5f-f2d135620659
42,208
supabase-export-v2
64ce62471252d3c8
.. method:: close() Complete the parsing of all previously fed data and return the root message object. It is undefined what happens if :meth:`~feed` is called after this method has been called.
trusted_official_docs
CPython Docs
.. method:: close() Complete the parsing of all previously fed data and return the root message object. It is undefined what happens if :meth:`~feed` is called after this method has been called.
.. method:: close() Complete the parsing of all previously fed data and return the root message object. It is undefined what happens if :meth:`~feed` is called after this method has been called.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2e430bc2-e9fe-4933-a645-c1bc3fdcb1ca
CPython Docs
file://datasets/cpython/Doc/library/email.parser.rst
unknown
db56978b-bb94-4b30-ab5f-f2d135620659
42,250
supabase-export-v2
23c83811d61c7742
Return a message object structure from a string. This is equivalent to ``Parser().parsestr(s)``. *_class* and *policy* are interpreted as with the :class:`~email.parser.Parser` class constructor. .. versionchanged:: 3.3 Removed the *strict* argument. Added the *policy* keyword.
trusted_official_docs
CPython Docs
Return a message object structure from a string. This is equivalent to ``Parser().parsestr(s)``. *_class* and *policy* are interpreted as with the :class:`~email.parser.Parser` class constructor. .. versionchanged:: 3.3 Removed the *strict* argument. Added the *policy* keyword.
Return a message object structure from a string. This is equivalent to ``Parser().parsestr(s)``. *_class* and *policy* are interpreted as with the :class:`~email.parser.Parser` class constructor. .. versionchanged:: 3.3 Removed the *strict* argument. Added the *policy* keyword.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2f58d67c-ee72-4c22-bb78-5513f66e8dad
CPython Docs
file://datasets/cpython/Doc/library/email.parser.rst
unknown
db56978b-bb94-4b30-ab5f-f2d135620659
42,231
supabase-export-v2
9f6e79364b28a4d8
This class is parallel to :class:`BytesParser`, but handles string input. .. versionchanged:: 3.3 Removed the *strict* argument. Added the *policy* keyword. .. versionchanged:: 3.6 *_class* defaults to the policy ``message_factory``.
trusted_official_docs
CPython Docs
This class is parallel to :class:`BytesParser`, but handles string input. .. versionchanged:: 3.3 Removed the *strict* argument. Added the *policy* keyword. .. versionchanged:: 3.6 *_class* defaults to the policy ``message_factory``.
This class is parallel to :class:`BytesParser`, but handles string input. .. versionchanged:: 3.3 Removed the *strict* argument. Added the *policy* keyword. .. versionchanged:: 3.6 *_class* defaults to the policy ``message_factory``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
312581df-4caf-4cc5-b0d6-b789997b24e2
CPython Docs
file://datasets/cpython/Doc/library/email.parser.rst
unknown
db56978b-bb94-4b30-ab5f-f2d135620659
42,260
supabase-export-v2
307df61b90167e49
a list of sub-message objects for their payload. The outer container message will return ``True`` for :meth:`~email.message.EmailMessage.is_multipart`, and :meth:`~email.message.EmailMessage.iter_parts` will yield a list of subparts. * Most messages with a content type of :mimetype:`message/\*` (such as :mimetype:`mes...
trusted_official_docs
CPython Docs
a list of sub-message objects for their payload. The outer container message will return ``True`` for :meth:`~email.message.EmailMessage.is_multipart`, and :meth:`~email.message.EmailMessage.iter_parts` will yield a list of subparts. * Most messages with a content type of :mimetype:`message/\*` (such as :mimetype:`mes...
a list of sub-message objects for their payload. The outer container message will return ``True`` for :meth:`~email.message.EmailMessage.is_multipart`, and :meth:`~email.message.EmailMessage.iter_parts` will yield a list of subparts. * Most messages with a content type of :mimetype:`message/\*` (such as :mimetype:`mes...
python, official-docs, cpython, P0
Local_Trusted_Corpus