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
005b348a-8631-4033-b671-247f960b73b7
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,681
supabase-export-v2
83df170a74f7f9a5
.. versionchanged:: 3.2 :class:`TestCase` can be instantiated successfully without providing a *methodName*. This makes it easier to experiment with :class:`TestCase` from the interactive interpreter. :class:`TestCase` instances provide three groups of methods: one group used to run the test, another used by the test ...
trusted_official_docs
CPython Docs
.. versionchanged:: 3.2 :class:`TestCase` can be instantiated successfully without providing a *methodName*. This makes it easier to experiment with :class:`TestCase` from the interactive interpreter. :class:`TestCase` instances provide three groups of methods: one group used to run the test, another used by the test ...
.. versionchanged:: 3.2 :class:`TestCase` can be instantiated successfully without providing a *methodName*. This makes it easier to experiment with :class:`TestCase` from the interactive interpreter. :class:`TestCase` instances provide three groups of methods: one group used to run the test, another used by the test ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
007c3c0c-ac25-436f-a8ee-c96cd232334b
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,013
supabase-export-v2
153d990010ce604f
matches are always performed using :meth:`fnmatch.fnmatchcase`, so unlike patterns passed to the ``-k`` option, simple substring patterns will have to be converted using ``*`` wildcards. This affects all the ``loadTestsFrom*`` methods.
trusted_official_docs
CPython Docs
matches are always performed using :meth:`fnmatch.fnmatchcase`, so unlike patterns passed to the ``-k`` option, simple substring patterns will have to be converted using ``*`` wildcards. This affects all the ``loadTestsFrom*`` methods.
matches are always performed using :meth:`fnmatch.fnmatchcase`, so unlike patterns passed to the ``-k`` option, simple substring patterns will have to be converted using ``*`` wildcards. This affects all the ``loadTestsFrom*`` methods.
python, official-docs, cpython, P0
Local_Trusted_Corpus
009b041e-40a5-4e64-8486-77235ff6c4a6
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,999
supabase-export-v2
0ea25a36bb8004e2
.. 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 officially removes it. .. versionchanged:: 3.13 *top_level_dir* is only stored for the duration of *discover* call.
trusted_official_docs
CPython Docs
.. 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 officially removes it. .. versionchanged:: 3.13 *top_level_dir* is only stored for the duration of *discover* call.
.. 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 officially removes it. .. versionchanged:: 3.13 *top_level_dir* is only stored for the duration of *discover* call.
python, official-docs, cpython, P0
Local_Trusted_Corpus
00ea6e90-a2d5-4da5-8db8-7a5f705da051
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,814
supabase-export-v2
3e6032686183a787
Test that *first* is respectively >, >=, < or <= than *second* depending on the method name. If not, the test will fail:: >>> self.assertGreaterEqual(3, 4) AssertionError: "3" unexpectedly not greater than or equal to "4"
trusted_official_docs
CPython Docs
Test that *first* is respectively >, >=, < or <= than *second* depending on the method name. If not, the test will fail:: >>> self.assertGreaterEqual(3, 4) AssertionError: "3" unexpectedly not greater than or equal to "4"
Test that *first* is respectively >, >=, < or <= than *second* depending on the method name. If not, the test will fail:: >>> self.assertGreaterEqual(3, 4) AssertionError: "3" unexpectedly not greater than or equal to "4"
python, official-docs, cpython, P0
Local_Trusted_Corpus
012c9042-e026-4148-b0a6-c3b6076e7dae
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,493
supabase-export-v2
c5d8e44f37597ce6
Basic example ------------- The :mod:`!unittest` module provides a rich set of tools for constructing and running tests. This section demonstrates that a small subset of the tools suffice to meet the needs of most users.
trusted_official_docs
CPython Docs
Basic example ------------- The :mod:`!unittest` module provides a rich set of tools for constructing and running tests. This section demonstrates that a small subset of the tools suffice to meet the needs of most users.
Basic example ------------- The :mod:`!unittest` module provides a rich set of tools for constructing and running tests. This section demonstrates that a small subset of the tools suffice to meet the needs of most users.
python, official-docs, cpython, P0
Local_Trusted_Corpus
019c8d74-0d6f-4c77-aaa5-41174123764d
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,022
supabase-export-v2
dc9454b758ff9802
.. attribute:: failures A list containing 2-tuples of :class:`TestCase` instances and strings holding formatted tracebacks. Each tuple represents a test where a failure was explicitly signalled using the :ref:`assert\* methods <assert-methods>`.
trusted_official_docs
CPython Docs
.. attribute:: failures A list containing 2-tuples of :class:`TestCase` instances and strings holding formatted tracebacks. Each tuple represents a test where a failure was explicitly signalled using the :ref:`assert\* methods <assert-methods>`.
.. attribute:: failures A list containing 2-tuples of :class:`TestCase` instances and strings holding formatted tracebacks. Each tuple represents a test where a failure was explicitly signalled using the :ref:`assert\* methods <assert-methods>`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
026e25b0-cdc7-4303-b25c-7a802dbd19b6
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,977
supabase-export-v2
9bf5dff3655e46fc
method on a possible test case class will be picked up as "a test method within a test case class", rather than "a callable object". For example, if you have a module :mod:`!SampleTests` containing a :class:`TestCase`\ -derived class :class:`!SampleTestCase` with three test methods (:meth:`!test_one`, :meth:`!test_tw...
trusted_official_docs
CPython Docs
method on a possible test case class will be picked up as "a test method within a test case class", rather than "a callable object". For example, if you have a module :mod:`!SampleTests` containing a :class:`TestCase`\ -derived class :class:`!SampleTestCase` with three test methods (:meth:`!test_one`, :meth:`!test_tw...
method on a possible test case class will be picked up as "a test method within a test case class", rather than "a callable object". For example, if you have a module :mod:`!SampleTests` containing a :class:`TestCase`\ -derived class :class:`!SampleTestCase` with three test methods (:meth:`!test_one`, :meth:`!test_tw...
python, official-docs, cpython, P0
Local_Trusted_Corpus
02962851-b89b-4dff-8019-fed09fe1321b
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,539
supabase-export-v2
07da7cb13999dc5e
.. option:: -k Only run test methods and classes that match the pattern or substring. This option may be used multiple times, in which case all test cases that match any of the given patterns are included.
trusted_official_docs
CPython Docs
.. option:: -k Only run test methods and classes that match the pattern or substring. This option may be used multiple times, in which case all test cases that match any of the given patterns are included.
.. option:: -k Only run test methods and classes that match the pattern or substring. This option may be used multiple times, in which case all test cases that match any of the given patterns are included.
python, official-docs, cpython, P0
Local_Trusted_Corpus
030a90e8-2b0d-4380-bb13-7cd10edae33d
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,012
supabase-export-v2
2156623befeba514
List of Unix shell-style wildcard test name patterns that test methods have to match to be included in test suites (see ``-k`` option). If this attribute is not ``None`` (the default), all test methods to be included in test suites must match one of the patterns in this list. Note that matches are always performed usi...
trusted_official_docs
CPython Docs
List of Unix shell-style wildcard test name patterns that test methods have to match to be included in test suites (see ``-k`` option). If this attribute is not ``None`` (the default), all test methods to be included in test suites must match one of the patterns in this list. Note that matches are always performed usi...
List of Unix shell-style wildcard test name patterns that test methods have to match to be included in test suites (see ``-k`` option). If this attribute is not ``None`` (the default), all test methods to be included in test suites must match one of the patterns in this list. Note that matches are always performed usi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
03cd1648-a85c-4d83-996a-71158b200e38
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,601
supabase-export-v2
80f4c56adf57c194
If :meth:`~TestCase.setUp` succeeded, :meth:`~TestCase.tearDown` will be run whether the test method succeeded or not. Such a working environment for the testing code is called a :dfn:`test fixture`. A new TestCase instance is created as a unique test fixture used to execute each individual test method. Thus :meth:`~Te...
trusted_official_docs
CPython Docs
If :meth:`~TestCase.setUp` succeeded, :meth:`~TestCase.tearDown` will be run whether the test method succeeded or not. Such a working environment for the testing code is called a :dfn:`test fixture`. A new TestCase instance is created as a unique test fixture used to execute each individual test method. Thus :meth:`~Te...
If :meth:`~TestCase.setUp` succeeded, :meth:`~TestCase.tearDown` will be run whether the test method succeeded or not. Such a working environment for the testing code is called a :dfn:`test fixture`. A new TestCase instance is created as a unique test fixture used to execute each individual test method. Thus :meth:`~Te...
python, official-docs, cpython, P0
Local_Trusted_Corpus
03f64df9-2f58-45f9-afa5-3ea9c943b87e
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,686
supabase-export-v2
1b03649194e4834f
.. method:: tearDown() Method called immediately after the test method has been called and the result recorded. This is called even if the test method raised an exception, so the implementation in subclasses may need to be particularly careful about checking internal state. Any exception, other than :exc:`Assertion...
trusted_official_docs
CPython Docs
.. method:: tearDown() Method called immediately after the test method has been called and the result recorded. This is called even if the test method raised an exception, so the implementation in subclasses may need to be particularly careful about checking internal state. Any exception, other than :exc:`Assertion...
.. method:: tearDown() Method called immediately after the test method has been called and the result recorded. This is called even if the test method raised an exception, so the implementation in subclasses may need to be particularly careful about checking internal state. Any exception, other than :exc:`Assertion...
python, official-docs, cpython, P0
Local_Trusted_Corpus
045c4768-ca1c-491e-8393-99221e0c5eea
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,616
supabase-export-v2
c8bcc5504dcc3fef
Re-using old test code ---------------------- Some users will find that they have existing test code that they would like to run from :mod:`!unittest`, without converting every old test function to a :class:`TestCase` subclass.
trusted_official_docs
CPython Docs
Re-using old test code ---------------------- Some users will find that they have existing test code that they would like to run from :mod:`!unittest`, without converting every old test function to a :class:`TestCase` subclass.
Re-using old test code ---------------------- Some users will find that they have existing test code that they would like to run from :mod:`!unittest`, without converting every old test function to a :class:`TestCase` subclass.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0472c12a-6368-4f33-a734-b1b21df1556b
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,139
supabase-export-v2
aa31eac65025e264
Class and Module Fixtures ------------------------- Class and module level fixtures are implemented in :class:`TestSuite`. When the test suite encounters 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 ne...
trusted_official_docs
CPython Docs
Class and Module Fixtures ------------------------- Class and module level fixtures are implemented in :class:`TestSuite`. When the test suite encounters 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 ne...
Class and Module Fixtures ------------------------- Class and module level fixtures are implemented in :class:`TestSuite`. When the test suite encounters 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 ne...
python, official-docs, cpython, P0
Local_Trusted_Corpus
057f3222-05fe-455f-bb72-3e59ffafb1d5
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,161
supabase-export-v2
7e5f55f5d60c4f02
.. function:: addModuleCleanup(function, /, *args, **kwargs) Add a function to be called after :func:`tearDownModule` to cleanup resources used during the test class. 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 keywo...
trusted_official_docs
CPython Docs
.. function:: addModuleCleanup(function, /, *args, **kwargs) Add a function to be called after :func:`tearDownModule` to cleanup resources used during the test class. 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 keywo...
.. function:: addModuleCleanup(function, /, *args, **kwargs) Add a function to be called after :func:`tearDownModule` to cleanup resources used during the test class. 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 keywo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
05c52cfe-646a-4f26-bea8-9b3b37f86d6b
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,958
supabase-export-v2
7858f749754f3d2c
class; the :mod:`!unittest` module provides an instance that can be shared as :data:`unittest.defaultTestLoader`. Using a subclass or instance, however, allows customization of some configurable properties. :class:`TestLoader` objects have the following attributes:
trusted_official_docs
CPython Docs
class; the :mod:`!unittest` module provides an instance that can be shared as :data:`unittest.defaultTestLoader`. Using a subclass or instance, however, allows customization of some configurable properties. :class:`TestLoader` objects have the following attributes:
class; the :mod:`!unittest` module provides an instance that can be shared as :data:`unittest.defaultTestLoader`. Using a subclass or instance, however, allows customization of some configurable properties. :class:`TestLoader` objects have the following attributes:
python, official-docs, cpython, P0
Local_Trusted_Corpus
05d29dae-e731-4a1b-8ca1-119a1387f705
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,655
supabase-export-v2
96ef2cd6e20b6966
.. decorator:: expectedFailure Mark the test as an expected failure or error. If the test fails or errors in the test function itself (rather than in one of the :dfn:`test fixture` methods) then it will be considered a success. If the test passes, it will be considered a failure.
trusted_official_docs
CPython Docs
.. decorator:: expectedFailure Mark the test as an expected failure or error. If the test fails or errors in the test function itself (rather than in one of the :dfn:`test fixture` methods) then it will be considered a success. If the test passes, it will be considered a failure.
.. decorator:: expectedFailure Mark the test as an expected failure or error. If the test fails or errors in the test function itself (rather than in one of the :dfn:`test fixture` methods) then it will be considered a success. If the test passes, it will be considered a failure.
python, official-docs, cpython, P0
Local_Trusted_Corpus
068fda10-0dc0-48d2-84de-2c7ca72df053
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,849
supabase-export-v2
8b20fa646016bd97
.. method:: assertSetEqual(first, second, msg=None) Tests that two sets are equal. If not, an error message is constructed that lists the differences between the sets. This method is used by default when comparing sets or frozensets with :meth:`assertEqual`.
trusted_official_docs
CPython Docs
.. method:: assertSetEqual(first, second, msg=None) Tests that two sets are equal. If not, an error message is constructed that lists the differences between the sets. This method is used by default when comparing sets or frozensets with :meth:`assertEqual`.
.. method:: assertSetEqual(first, second, msg=None) Tests that two sets are equal. If not, an error message is constructed that lists the differences between the sets. This method is used by default when comparing sets or frozensets with :meth:`assertEqual`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0776cd6a-63ec-43b8-b1b8-ffe2f4d5665f
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,635
supabase-export-v2
d720ad0b0c0a6fdb
@unittest.skipUnless(sys.platform.startswith("win"), "requires Windows") def test_windows_support(self): # windows specific testing code pass def test_maybe_skipped(self): if not external_resource_available(): self.skipTest("external resource not available") # test code that depends on the external resource pass
trusted_official_docs
CPython Docs
@unittest.skipUnless(sys.platform.startswith("win"), "requires Windows") def test_windows_support(self): # windows specific testing code pass def test_maybe_skipped(self): if not external_resource_available(): self.skipTest("external resource not available") # test code that depends on the external resource pass
@unittest.skipUnless(sys.platform.startswith("win"), "requires Windows") def test_windows_support(self): # windows specific testing code pass def test_maybe_skipped(self): if not external_resource_available(): self.skipTest("external resource not available") # test code that depends on the external resource pass
python, official-docs, cpython, P0
Local_Trusted_Corpus
09a2e0af-a12b-4db1-973c-e22db7f8d03a
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,634
supabase-export-v2
a70c2ede805274a5
@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.skipUnless(sys.platform.startswith("win"), "requires Windows") def test_windows_support(self): # windows specific testing code pass
trusted_official_docs
CPython Docs
@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.skipUnless(sys.platform.startswith("win"), "requires Windows") def test_windows_support(self): # windows specific testing code pass
@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.skipUnless(sys.platform.startswith("win"), "requires Windows") def test_windows_support(self): # windows specific testing code pass
python, official-docs, cpython, P0
Local_Trusted_Corpus
0a9b31b1-0425-4d4b-8706-58f02f26cf71
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,037
supabase-export-v2
348e9ca16ba631dd
.. attribute:: buffer If set to true, ``sys.stdout`` and ``sys.stderr`` will be buffered in between :meth:`startTest` and :meth:`stopTest` being called. Collected output will only be echoed onto the real ``sys.stdout`` and ``sys.stderr`` if the test fails or errors. Any output is also attached to the failure / error...
trusted_official_docs
CPython Docs
.. attribute:: buffer If set to true, ``sys.stdout`` and ``sys.stderr`` will be buffered in between :meth:`startTest` and :meth:`stopTest` being called. Collected output will only be echoed onto the real ``sys.stdout`` and ``sys.stderr`` if the test fails or errors. Any output is also attached to the failure / error...
.. attribute:: buffer If set to true, ``sys.stdout`` and ``sys.stderr`` will be buffered in between :meth:`startTest` and :meth:`stopTest` being called. Collected output will only be echoed onto the real ``sys.stdout`` and ``sys.stderr`` if the test fails or errors. Any output is also attached to the failure / error...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0b333a20-d783-48d6-bbf0-04c3ec46c600
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,911
supabase-export-v2
b4abdfed978f44da
.. method:: asyncTearDown() :async: Method called immediately after the test method has been called and the result recorded. This is called before :meth:`~TestCase.tearDown`. This is called even if the test method raised an exception, so the implementation in subclasses may need to be particularly careful about chec...
trusted_official_docs
CPython Docs
.. method:: asyncTearDown() :async: Method called immediately after the test method has been called and the result recorded. This is called before :meth:`~TestCase.tearDown`. This is called even if the test method raised an exception, so the implementation in subclasses may need to be particularly careful about chec...
.. method:: asyncTearDown() :async: Method called immediately after the test method has been called and the result recorded. This is called before :meth:`~TestCase.tearDown`. This is called even if the test method raised an exception, so the implementation in subclasses may need to be particularly careful about chec...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0d320093-8c08-4cbf-a566-b59363f2210d
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,124
supabase-export-v2
d07797ea11c718d4
Modules or packages can customize how tests are loaded from them during normal test runs or test discovery by implementing a function called ``load_tests``. If a test module defines ``load_tests`` it will be called by :meth:`TestLoader.loadTestsFromModule` with the following arguments::
trusted_official_docs
CPython Docs
Modules or packages can customize how tests are loaded from them during normal test runs or test discovery by implementing a function called ``load_tests``. If a test module defines ``load_tests`` it will be called by :meth:`TestLoader.loadTestsFromModule` with the following arguments::
Modules or packages can customize how tests are loaded from them during normal test runs or test discovery by implementing a function called ``load_tests``. If a test module defines ``load_tests`` it will be called by :meth:`TestLoader.loadTestsFromModule` with the following arguments::
python, official-docs, cpython, P0
Local_Trusted_Corpus
0e660165-7b0f-4e6b-8ce5-cd641ee88b12
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,951
supabase-export-v2
9329d37d1a0538c1
.. method:: __iter__() Tests grouped by a :class:`TestSuite` are always accessed by iteration. Subclasses can lazily provide tests by overriding :meth:`!__iter__`. Note that this method may be called several times on a single suite (for example when counting tests or comparing for equality) so the tests returned by ...
trusted_official_docs
CPython Docs
.. method:: __iter__() Tests grouped by a :class:`TestSuite` are always accessed by iteration. Subclasses can lazily provide tests by overriding :meth:`!__iter__`. Note that this method may be called several times on a single suite (for example when counting tests or comparing for equality) so the tests returned by ...
.. method:: __iter__() Tests grouped by a :class:`TestSuite` are always accessed by iteration. Subclasses can lazily provide tests by overriding :meth:`!__iter__`. Note that this method may be called several times on a single suite (for example when counting tests or comparing for equality) so the tests returned by ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0f4bc5f2-0505-4739-8ef5-dc6c511487b7
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,786
supabase-export-v2
efeacd4af5c738e7
the name of a logger. The default is the root logger, which will catch all messages that were not blocked by a non-propagating descendent logger. 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:`loggi...
trusted_official_docs
CPython Docs
the name of a logger. The default is the root logger, which will catch all messages that were not blocked by a non-propagating descendent logger. 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:`loggi...
the name of a logger. The default is the root logger, which will catch all messages that were not blocked by a non-propagating descendent logger. 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:`loggi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0f9aaf12-8c91-4865-8750-23ff34cec405
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,745
supabase-export-v2
ad2bc2688cb9c023
When used as a context manager, :meth:`assertRaises` accepts the additional keyword argument *msg*. The context manager will 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::
trusted_official_docs
CPython Docs
When used as a context manager, :meth:`assertRaises` accepts the additional keyword argument *msg*. The context manager will 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::
When used as a context manager, :meth:`assertRaises` accepts the additional keyword argument *msg*. The context manager will 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::
python, official-docs, cpython, P0
Local_Trusted_Corpus
1016fbb9-3b91-4856-84d8-841a43ac6fd2
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,682
supabase-export-v2
22f016b3ac5320e2
another used by the test implementation to check conditions and report failures, and some inquiry methods allowing information about the test itself to be gathered. Methods in the first group (running the test) are:
trusted_official_docs
CPython Docs
another used by the test implementation to check conditions and report failures, and some inquiry methods allowing information about the test itself to be gathered. Methods in the first group (running the test) are:
another used by the test implementation to check conditions and report failures, and some inquiry methods allowing information about the test itself to be gathered. Methods in the first group (running the test) are:
python, official-docs, cpython, P0
Local_Trusted_Corpus
1050dc19-02ac-4206-8391-8bfcbb728461
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,716
supabase-export-v2
812eeb32c622ccd8
the type-specific equality function will be called in order to generate a more useful default error message (see also the :ref:`list of type-specific methods <type-specific-methods>`). .. versionchanged:: 3.1 Added the automatic calling of type-specific equality function.
trusted_official_docs
CPython Docs
the type-specific equality function will be called in order to generate a more useful default error message (see also the :ref:`list of type-specific methods <type-specific-methods>`). .. versionchanged:: 3.1 Added the automatic calling of type-specific equality function.
the type-specific equality function will be called in order to generate a more useful default error message (see also the :ref:`list of type-specific methods <type-specific-methods>`). .. versionchanged:: 3.1 Added the automatic calling of type-specific equality function.
python, official-docs, cpython, P0
Local_Trusted_Corpus
10927b5a-9754-4033-bded-02c4fa264367
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,919
supabase-export-v2
ba6f50977ce8b710
and used. The result object is returned to :meth:`run`'s caller. At the end of the test all the tasks in the event loop are cancelled. An example illustrating the order::
trusted_official_docs
CPython Docs
and used. The result object is returned to :meth:`run`'s caller. At the end of the test all the tasks in the event loop are cancelled. An example illustrating the order::
and used. The result object is returned to :meth:`run`'s caller. At the end of the test all the tasks in the event loop are cancelled. An example illustrating the order::
python, official-docs, cpython, P0
Local_Trusted_Corpus
11d93c65-dfc2-4726-8a8a-533752fb6062
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,936
supabase-export-v2
4f5abee38526367b
it to be run as any other test case. Running a :class:`TestSuite` instance is the same as iterating over the suite, running each test individually. If *tests* is given, it must be an iterable of individual test cases or other test suites that will be used to build the suite initially. Additional methods are provided ...
trusted_official_docs
CPython Docs
it to be run as any other test case. Running a :class:`TestSuite` instance is the same as iterating over the suite, running each test individually. If *tests* is given, it must be an iterable of individual test cases or other test suites that will be used to build the suite initially. Additional methods are provided ...
it to be run as any other test case. Running a :class:`TestSuite` instance is the same as iterating over the suite, running each test individually. If *tests* is given, it must be an iterable of individual test cases or other test suites that will be used to build the suite initially. Additional methods are provided ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1293ac3d-86ab-45dc-b827-92f394955f59
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,142
supabase-export-v2
44117512e8b88093
After all the tests have run the final ``tearDownClass`` and ``tearDownModule`` are run. 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.
trusted_official_docs
CPython Docs
After all the tests have run the final ``tearDownClass`` and ``tearDownModule`` are run. 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.
After all the tests have run the final ``tearDownClass`` and ``tearDownModule`` are run. 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
129842ef-d780-441d-abe5-57f71f9377ab
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,985
supabase-export-v2
0103d6fa95e981c5
.. method:: discover(start_dir, pattern='test*.py', top_level_dir=None) Find all the test modules by recursing into subdirectories from the specified start directory, and return a TestSuite object containing them. Only test files that match *pattern* will be loaded. (Using shell style pattern matching.) Only module n...
trusted_official_docs
CPython Docs
.. method:: discover(start_dir, pattern='test*.py', top_level_dir=None) Find all the test modules by recursing into subdirectories from the specified start directory, and return a TestSuite object containing them. Only test files that match *pattern* will be loaded. (Using shell style pattern matching.) Only module n...
.. method:: discover(start_dir, pattern='test*.py', top_level_dir=None) Find all the test modules by recursing into subdirectories from the specified start directory, and return a TestSuite object containing them. Only test files that match *pattern* will be loaded. (Using shell style pattern matching.) Only module n...
python, official-docs, cpython, P0
Local_Trusted_Corpus
12a6c57d-204e-4a74-b39c-4d0fbad258b1
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,017
supabase-export-v2
25b590728c5e58c0
tests. The :class:`TestCase` and :class:`TestSuite` classes ensure that results are properly recorded; test authors do not need to worry about recording the outcome of tests. Testing frameworks built on top of :mod:`!unittest` may want access to the :class:`TestResult` object generated by running a set of tests for re...
trusted_official_docs
CPython Docs
tests. The :class:`TestCase` and :class:`TestSuite` classes ensure that results are properly recorded; test authors do not need to worry about recording the outcome of tests. Testing frameworks built on top of :mod:`!unittest` may want access to the :class:`TestResult` object generated by running a set of tests for re...
tests. The :class:`TestCase` and :class:`TestSuite` classes ensure that results are properly recorded; test authors do not need to worry about recording the outcome of tests. Testing frameworks built on top of :mod:`!unittest` may want access to the :class:`TestResult` object generated by running a set of tests for re...
python, official-docs, cpython, P0
Local_Trusted_Corpus
12c9d7a4-cd1f-45d4-97ad-ffced0dceaca
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,787
supabase-export-v2
a254c6260fc3b156
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`. If given, *formatter* should be a :class:`logging.Formatter` object. The default is a formatter with format string ``"%(levelname)s:%(nam...
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`. If given, *formatter* should be a :class:`logging.Formatter` object. The default is a formatter with format string ``"%(levelname)s:%(nam...
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`. If given, *formatter* should be a :class:`logging.Formatter` object. The default is a formatter with format string ``"%(levelname)s:%(nam...
python, official-docs, cpython, P0
Local_Trusted_Corpus
137473c2-c1ac-462f-9d18-072607b937e4
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,540
supabase-export-v2
b94d21e1b092b89f
pattern or substring. This option may be used multiple times, in which case all test cases that match any of the given patterns are included. Patterns that contain a wildcard character (``*``) are matched against the test name using :meth:`fnmatch.fnmatchcase`; otherwise simple case-sensitive substring matching is us...
trusted_official_docs
CPython Docs
pattern or substring. This option may be used multiple times, in which case all test cases that match any of the given patterns are included. Patterns that contain a wildcard character (``*``) are matched against the test name using :meth:`fnmatch.fnmatchcase`; otherwise simple case-sensitive substring matching is us...
pattern or substring. This option may be used multiple times, in which case all test cases that match any of the given patterns are included. Patterns that contain a wildcard character (``*``) are matched against the test name using :meth:`fnmatch.fnmatchcase`; otherwise simple case-sensitive substring matching is us...
python, official-docs, cpython, P0
Local_Trusted_Corpus
13a5cc29-9e44-4fba-8fef-47ec60cafae0
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,132
supabase-export-v2
7ba571fca2f373d7
def load_tests(loader, tests, pattern): suite = TestSuite() for test_class in test_cases: tests = loader.loadTestsFromTestCase(test_class) suite.addTests(tests) return suite If discovery is started in a directory containing a package, either from the command line or by calling :meth:`TestLoader.discover`, then the pack...
trusted_official_docs
CPython Docs
def load_tests(loader, tests, pattern): suite = TestSuite() for test_class in test_cases: tests = loader.loadTestsFromTestCase(test_class) suite.addTests(tests) return suite If discovery is started in a directory containing a package, either from the command line or by calling :meth:`TestLoader.discover`, then the pack...
def load_tests(loader, tests, pattern): suite = TestSuite() for test_class in test_cases: tests = loader.loadTestsFromTestCase(test_class) suite.addTests(tests) return suite If discovery is started in a directory containing a package, either from the command line or by calling :meth:`TestLoader.discover`, then the pack...
python, official-docs, cpython, P0
Local_Trusted_Corpus
142564d2-b85a-4c1b-810d-c284c4dbef2c
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,692
supabase-export-v2
65eeb6db70075fe6
.. method:: tearDownClass() A class method called after tests in an individual class have run. ``tearDownClass`` is called with the class as the only argument and must be decorated as a :meth:`classmethod`::
trusted_official_docs
CPython Docs
.. method:: tearDownClass() A class method called after tests in an individual class have run. ``tearDownClass`` is called with the class as the only argument and must be decorated as a :meth:`classmethod`::
.. method:: tearDownClass() A class method called after tests in an individual class have run. ``tearDownClass`` is called with the class as the only argument and must be decorated as a :meth:`classmethod`::
python, official-docs, cpython, P0
Local_Trusted_Corpus
14b6a05f-3ebe-4fd3-8d6c-d195be9c1062
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,684
supabase-export-v2
322f80e803e52686
.. method:: setUp() Method called to prepare the test fixture. This is called immediately before calling the test method; other than :exc:`AssertionError` or :exc:`SkipTest`, any exception raised by this method will be considered an error rather than a test failure. The default implementation does nothing.
trusted_official_docs
CPython Docs
.. method:: setUp() Method called to prepare the test fixture. This is called immediately before calling the test method; other than :exc:`AssertionError` or :exc:`SkipTest`, any exception raised by this method will be considered an error rather than a test failure. The default implementation does nothing.
.. method:: setUp() Method called to prepare the test fixture. This is called immediately before calling the test method; other than :exc:`AssertionError` or :exc:`SkipTest`, any exception raised by this method will be considered an error rather than a test failure. The default implementation does nothing.
python, official-docs, cpython, P0
Local_Trusted_Corpus
15520f1a-26d0-4ef9-8e93-628abd3945d3
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,680
supabase-export-v2
d02a597817262803
a single base method: the method named *methodName*. In most uses of :class:`TestCase`, you will neither change the *methodName* nor reimplement the default ``runTest()`` method. .. versionchanged:: 3.2 :class:`TestCase` can be instantiated successfully without providing a *methodName*. This makes it easier to experi...
trusted_official_docs
CPython Docs
a single base method: the method named *methodName*. In most uses of :class:`TestCase`, you will neither change the *methodName* nor reimplement the default ``runTest()`` method. .. versionchanged:: 3.2 :class:`TestCase` can be instantiated successfully without providing a *methodName*. This makes it easier to experi...
a single base method: the method named *methodName*. In most uses of :class:`TestCase`, you will neither change the *methodName* nor reimplement the default ``runTest()`` method. .. versionchanged:: 3.2 :class:`TestCase` can be instantiated successfully without providing a *methodName*. This makes it easier to experi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
15cf423c-9d55-446b-9c2c-102debc2c17e
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,764
supabase-export-v2
d2b928fc8f3b32f7
When used as a context manager, :meth:`assertWarns` accepts the additional keyword argument *msg*. The context manager will store the caught warning object in its :attr:`!warning` attribute, and the source line which triggered the warnings in the :attr:`!filename` and :attr:`!lineno` attributes. This can be useful if...
trusted_official_docs
CPython Docs
When used as a context manager, :meth:`assertWarns` accepts the additional keyword argument *msg*. The context manager will store the caught warning object in its :attr:`!warning` attribute, and the source line which triggered the warnings in the :attr:`!filename` and :attr:`!lineno` attributes. This can be useful if...
When used as a context manager, :meth:`assertWarns` accepts the additional keyword argument *msg*. The context manager will store the caught warning object in its :attr:`!warning` attribute, and the source line which triggered the warnings in the :attr:`!filename` and :attr:`!lineno` attributes. This can be useful if...
python, official-docs, cpython, P0
Local_Trusted_Corpus
170e0fda-a2b6-495a-864f-f274586b5e43
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,628
supabase-export-v2
284f0a525e923696
.. versionadded:: 3.1 Unittest supports skipping individual test methods and even whole classes of tests. In addition, it supports marking a test as an "expected failure," a test that is broken and will fail, but shouldn't be counted as a failure on a :class:`TestResult`.
trusted_official_docs
CPython Docs
.. versionadded:: 3.1 Unittest supports skipping individual test methods and even whole classes of tests. In addition, it supports marking a test as an "expected failure," a test that is broken and will fail, but shouldn't be counted as a failure on a :class:`TestResult`.
.. versionadded:: 3.1 Unittest supports skipping individual test methods and even whole classes of tests. In addition, it supports marking a test as an "expected failure," a test that is broken and will fail, but shouldn't be counted as a failure on a :class:`TestResult`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1866a6cf-5c8b-4ca5-ad48-e3744859d198
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,630
supabase-export-v2
d1d72e4743071ed9
a matter of using the :func:`skip` :term:`decorator` or one of its conditional variants, calling :meth:`TestCase.skipTest` within a :meth:`~TestCase.setUp` or test method, or raising :exc:`SkipTest` directly. Basic skipping looks like this::
trusted_official_docs
CPython Docs
a matter of using the :func:`skip` :term:`decorator` or one of its conditional variants, calling :meth:`TestCase.skipTest` within a :meth:`~TestCase.setUp` or test method, or raising :exc:`SkipTest` directly. Basic skipping looks like this::
a matter of using the :func:`skip` :term:`decorator` or one of its conditional variants, calling :meth:`TestCase.skipTest` within a :meth:`~TestCase.setUp` or test method, or raising :exc:`SkipTest` directly. Basic skipping looks like this::
python, official-docs, cpython, P0
Local_Trusted_Corpus
19102087-7a3c-4db4-b224-9443a7c508e2
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,697
supabase-export-v2
9a956a26867c1f84
.. method:: run(result=None) Run the test, collecting the result into the :class:`TestResult` object passed as *result*. If *result* is omitted or ``None``, a temporary result object is created (by calling the :meth:`defaultTestResult` method) and used. The result object is returned to :meth:`run`'s caller.
trusted_official_docs
CPython Docs
.. method:: run(result=None) Run the test, collecting the result into the :class:`TestResult` object passed as *result*. If *result* is omitted or ``None``, a temporary result object is created (by calling the :meth:`defaultTestResult` method) and used. The result object is returned to :meth:`run`'s caller.
.. method:: run(result=None) Run the test, collecting the result into the :class:`TestResult` object passed as *result*. If *result* is omitted or ``None``, a temporary result object is created (by calling the :meth:`defaultTestResult` method) and used. The result object is returned to :meth:`run`'s caller.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1bd30650-248f-4b2c-bbb2-6f3ff4d508fe
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,846
supabase-export-v2
55a520b7966e514a
.. method:: assertListEqual(first, second, msg=None) assertTupleEqual(first, second, msg=None) Tests that two lists or tuples are equal. If not, an error message is constructed that shows only the differences between the two. An error is also raised if either of the parameters are of the wrong type. These methods are...
trusted_official_docs
CPython Docs
.. method:: assertListEqual(first, second, msg=None) assertTupleEqual(first, second, msg=None) Tests that two lists or tuples are equal. If not, an error message is constructed that shows only the differences between the two. An error is also raised if either of the parameters are of the wrong type. These methods are...
.. method:: assertListEqual(first, second, msg=None) assertTupleEqual(first, second, msg=None) Tests that two lists or tuples are equal. If not, an error message is constructed that shows only the differences between the two. An error is also raised if either of the parameters are of the wrong type. These methods are...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1c1b2052-0561-44d5-bc73-cd24d2558eb6
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,048
supabase-export-v2
3126c8568ed3e87b
the test framework when the user signals an interrupt from the keyboard. Interactive tools which provide :class:`!TestRunner` implementations can use this in a similar manner. The following methods of the :class:`TestResult` class are used to maintain the internal data structures, and may be extended in subclasses to ...
trusted_official_docs
CPython Docs
the test framework when the user signals an interrupt from the keyboard. Interactive tools which provide :class:`!TestRunner` implementations can use this in a similar manner. The following methods of the :class:`TestResult` class are used to maintain the internal data structures, and may be extended in subclasses to ...
the test framework when the user signals an interrupt from the keyboard. Interactive tools which provide :class:`!TestRunner` implementations can use this in a similar manner. The following methods of the :class:`TestResult` class are used to maintain the internal data structures, and may be extended in subclasses to ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1c47301e-c0d6-4aae-a2f1-db8bab9b5c3a
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,175
supabase-export-v2
54c32ff9e2006b55
and the test run will then end and report all the results so far. A second control-c will raise a :exc:`KeyboardInterrupt` in the usual way. The control-c handling signal handler attempts to remain compatible with code or tests that install their own :const:`signal.SIGINT` handler. If the ``unittest`` handler is called...
trusted_official_docs
CPython Docs
and the test run will then end and report all the results so far. A second control-c will raise a :exc:`KeyboardInterrupt` in the usual way. The control-c handling signal handler attempts to remain compatible with code or tests that install their own :const:`signal.SIGINT` handler. If the ``unittest`` handler is called...
and the test run will then end and report all the results so far. A second control-c will raise a :exc:`KeyboardInterrupt` in the usual way. The control-c handling signal handler attempts to remain compatible with code or tests that install their own :const:`signal.SIGINT` handler. If the ``unittest`` handler is called...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1cf80f45-a660-4fe4-85ca-91d9553268fe
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,624
supabase-export-v2
e86f98b9090b67bd
a :mod:`!unittest`\ -based system, this approach is not recommended. Taking the time to set up proper :class:`TestCase` subclasses will make future test refactorings infinitely easier. In some cases, the existing tests may have been written using the :mod:`doctest` module. If so, :mod:`doctest` provides a :class:`~doct...
trusted_official_docs
CPython Docs
a :mod:`!unittest`\ -based system, this approach is not recommended. Taking the time to set up proper :class:`TestCase` subclasses will make future test refactorings infinitely easier. In some cases, the existing tests may have been written using the :mod:`doctest` module. If so, :mod:`doctest` provides a :class:`~doct...
a :mod:`!unittest`\ -based system, this approach is not recommended. Taking the time to set up proper :class:`TestCase` subclasses will make future test refactorings infinitely easier. In some cases, the existing tests may have been written using the :mod:`doctest` module. If so, :mod:`doctest` provides a :class:`~doct...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1da0846a-2f93-4d26-bdc3-71d25cc78e21
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,645
supabase-export-v2
bc464029891b1050
class ExpectedFailureTestCase(unittest.TestCase): @unittest.expectedFailure def test_fail(self): self.assertEqual(1, 0, "broken") It's easy to roll your own skipping decorators by making a decorator that calls :func:`skip` on the test when it wants it to be skipped. This decorator skips the test unless the passed objec...
trusted_official_docs
CPython Docs
class ExpectedFailureTestCase(unittest.TestCase): @unittest.expectedFailure def test_fail(self): self.assertEqual(1, 0, "broken") It's easy to roll your own skipping decorators by making a decorator that calls :func:`skip` on the test when it wants it to be skipped. This decorator skips the test unless the passed objec...
class ExpectedFailureTestCase(unittest.TestCase): @unittest.expectedFailure def test_fail(self): self.assertEqual(1, 0, "broken") It's easy to roll your own skipping decorators by making a decorator that calls :func:`skip` on the test when it wants it to be skipped. This decorator skips the test unless the passed objec...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1e59a212-5d40-4629-a579-c6d4c268d7b4
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,834
supabase-export-v2
b619792b48d76d28
.. method:: addTypeEqualityFunc(typeobj, function) Registers a type-specific method called by :meth:`assertEqual` to check if two objects of exactly the same *typeobj* (not subclasses) compare equal. *function* must take two positional arguments and a third msg=None keyword argument just as :meth:`assertEqual` does....
trusted_official_docs
CPython Docs
.. method:: addTypeEqualityFunc(typeobj, function) Registers a type-specific method called by :meth:`assertEqual` to check if two objects of exactly the same *typeobj* (not subclasses) compare equal. *function* must take two positional arguments and a third msg=None keyword argument just as :meth:`assertEqual` does....
.. method:: addTypeEqualityFunc(typeobj, function) Registers a type-specific method called by :meth:`assertEqual` to check if two objects of exactly the same *typeobj* (not subclasses) compare equal. *function* must take two positional arguments and a third msg=None keyword argument just as :meth:`assertEqual` does....
python, official-docs, cpython, P0
Local_Trusted_Corpus
1f0a2229-d9dd-40ad-9a67-a33b8ffe6183
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,555
supabase-export-v2
1d3b66b0167215c1
.. versionadded:: 3.2 Unittest supports simple test discovery. In order to be compatible with test discovery, all of the test files 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:`identifie...
trusted_official_docs
CPython Docs
.. versionadded:: 3.2 Unittest supports simple test discovery. In order to be compatible with test discovery, all of the test files 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:`identifie...
.. versionadded:: 3.2 Unittest supports simple test discovery. In order to be compatible with test discovery, all of the test files 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:`identifie...
python, official-docs, cpython, P0
Local_Trusted_Corpus
201bb461-b249-4769-b2a3-5496fa953ec3
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,990
supabase-export-v2
b94d655fc7abfd04
If ``load_tests`` exists then discovery does *not* recurse into the package, ``load_tests`` is responsible for loading all tests in the package. The pattern is deliberately not stored as a loader attribute so that packages can continue discovery themselves.
trusted_official_docs
CPython Docs
If ``load_tests`` exists then discovery does *not* recurse into the package, ``load_tests`` is responsible for loading all tests in the package. The pattern is deliberately not stored as a loader attribute so that packages can continue discovery themselves.
If ``load_tests`` exists then discovery does *not* recurse into the package, ``load_tests`` is responsible for loading all tests in the package. The pattern is deliberately not stored as a loader attribute so that packages can continue discovery themselves.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2047c037-f805-44be-820c-1e83df8097a9
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,741
supabase-export-v2
06f115ad4a70909d
.. method:: assertRaises(exception, callable, *args, **kwds) assertRaises(exception, *, msg=None) Test that an exception is raised when *callable* is called with any positional or keyword arguments that are also passed to :meth:`assertRaises`. The test passes if *exception* is raised, is an error if another exceptio...
trusted_official_docs
CPython Docs
.. method:: assertRaises(exception, callable, *args, **kwds) assertRaises(exception, *, msg=None) Test that an exception is raised when *callable* is called with any positional or keyword arguments that are also passed to :meth:`assertRaises`. The test passes if *exception* is raised, is an error if another exceptio...
.. method:: assertRaises(exception, callable, *args, **kwds) assertRaises(exception, *, msg=None) Test that an exception is raised when *callable* is called with any positional or keyword arguments that are also passed to :meth:`assertRaises`. The test passes if *exception* is raised, is an error if another exceptio...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2160c626-7d5c-4021-9956-4973b35dc627
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,664
supabase-export-v2
0d46075c83ef8dce
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. For example, the following test::
trusted_official_docs
CPython Docs
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. For example, the following test::
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. For example, the following test::
python, official-docs, cpython, P0
Local_Trusted_Corpus
21c19e65-d0ad-43fe-9840-e747f8e79113
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,888
supabase-export-v2
d8729cfa48e13ef5
This method is called unconditionally after :meth:`tearDown`, or after :meth:`setUp` if :meth:`setUp` raises an exception. It is responsible for 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` y...
trusted_official_docs
CPython Docs
This method is called unconditionally after :meth:`tearDown`, or after :meth:`setUp` if :meth:`setUp` raises an exception. It is responsible for 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` y...
This method is called unconditionally after :meth:`tearDown`, or after :meth:`setUp` if :meth:`setUp` raises an exception. It is responsible for 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` y...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2244ac78-8ff3-4a86-bfcc-0a19cd9039e9
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,063
supabase-export-v2
b58b4a28f030a4b9
Called when the test case *test* signals a failure. *err* is a tuple of the form returned by :func:`sys.exc_info`: ``(type, value, traceback)``. The default implementation appends a tuple ``(test, formatted_err)`` to the instance's :attr:`failures` attribute, where *formatted_err* is a formatted traceback derived fro...
trusted_official_docs
CPython Docs
Called when the test case *test* signals a failure. *err* is a tuple of the form returned by :func:`sys.exc_info`: ``(type, value, traceback)``. The default implementation appends a tuple ``(test, formatted_err)`` to the instance's :attr:`failures` attribute, where *formatted_err* is a formatted traceback derived fro...
Called when the test case *test* signals a failure. *err* is a tuple of the form returned by :func:`sys.exc_info`: ``(type, value, traceback)``. The default implementation appends a tuple ``(test, formatted_err)`` to the instance's :attr:`failures` attribute, where *formatted_err* is a formatted traceback derived fro...
python, official-docs, cpython, P0
Local_Trusted_Corpus
24e80531-2c83-48f0-b3f7-e56277299827
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,638
supabase-export-v2
4a3b691d0fc87a1c
supported in this library version' test_nothing (__main__.MyTestCase.test_nothing) ... skipped 'demonstrating skipping' test_maybe_skipped (__main__.MyTestCase.test_maybe_skipped) ... skipped 'external resource not available' test_windows_support (__main__.MyTestCase.test_windows_support) ... skipped 'requires Windows'...
trusted_official_docs
CPython Docs
supported in this library version' test_nothing (__main__.MyTestCase.test_nothing) ... skipped 'demonstrating skipping' test_maybe_skipped (__main__.MyTestCase.test_maybe_skipped) ... skipped 'external resource not available' test_windows_support (__main__.MyTestCase.test_windows_support) ... skipped 'requires Windows'...
supported in this library version' test_nothing (__main__.MyTestCase.test_nothing) ... skipped 'demonstrating skipping' test_maybe_skipped (__main__.MyTestCase.test_maybe_skipped) ... skipped 'external resource not available' test_windows_support (__main__.MyTestCase.test_windows_support) ... skipped 'requires Windows'...
python, official-docs, cpython, P0
Local_Trusted_Corpus
26154b07-9c35-44c7-be4b-576d64ba735f
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,111
supabase-export-v2
ade37be4499944e3
exit code indicating success (0) or failure (1) of the tests run. An exit code of 5 indicates that no tests were run or skipped. The *testLoader* argument has to be a :class:`TestLoader` instance, and defaults to :data:`defaultTestLoader`.
trusted_official_docs
CPython Docs
exit code indicating success (0) or failure (1) of the tests run. An exit code of 5 indicates that no tests were run or skipped. The *testLoader* argument has to be a :class:`TestLoader` instance, and defaults to :data:`defaultTestLoader`.
exit code indicating success (0) or failure (1) of the tests run. An exit code of 5 indicates that no tests were run or skipped. The *testLoader* argument has to be a :class:`TestLoader` instance, and defaults to :data:`defaultTestLoader`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2688bd49-08ac-4eae-8c87-f0bfc2ffaa9c
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,578
supabase-export-v2
aa41b4fedd5dd235
.. versionchanged:: 3.4 Test discovery supports :term:`namespace packages <namespace package>`. .. versionchanged:: 3.11 Test discovery dropped the :term:`namespace packages <namespace package>` support. It has been broken since Python 3.7. Start directory and its subdirectories containing tests must be regular pack...
trusted_official_docs
CPython Docs
.. versionchanged:: 3.4 Test discovery supports :term:`namespace packages <namespace package>`. .. versionchanged:: 3.11 Test discovery dropped the :term:`namespace packages <namespace package>` support. It has been broken since Python 3.7. Start directory and its subdirectories containing tests must be regular pack...
.. versionchanged:: 3.4 Test discovery supports :term:`namespace packages <namespace package>`. .. versionchanged:: 3.11 Test discovery dropped the :term:`namespace packages <namespace package>` support. It has been broken since Python 3.7. Start directory and its subdirectories containing tests must be regular pack...
python, official-docs, cpython, P0
Local_Trusted_Corpus
269534f3-4612-4087-890f-0eb72d681791
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,104
supabase-export-v2
975bb61ad94383af
.. function:: main(module='__main__', defaultTest=None, argv=None, testRunner=None, \ testLoader=unittest.defaultTestLoader, exit=True, verbosity=1, \ failfast=None, catchbreak=None, buffer=None, warnings=None) A command-line program that loads a set of tests from *module* and runs them; this is primarily for making t...
trusted_official_docs
CPython Docs
.. function:: main(module='__main__', defaultTest=None, argv=None, testRunner=None, \ testLoader=unittest.defaultTestLoader, exit=True, verbosity=1, \ failfast=None, catchbreak=None, buffer=None, warnings=None) A command-line program that loads a set of tests from *module* and runs them; this is primarily for making t...
.. function:: main(module='__main__', defaultTest=None, argv=None, testRunner=None, \ testLoader=unittest.defaultTestLoader, exit=True, verbosity=1, \ failfast=None, catchbreak=None, buffer=None, warnings=None) A command-line program that loads a set of tests from *module* and runs them; this is primarily for making t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
27408e37-faa0-4b67-9d2f-69d411984f41
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,736
supabase-export-v2
780688d844bf714e
.. method:: assertIsSubclass(cls, superclass, msg=None) assertNotIsSubclass(cls, superclass, msg=None) Test that *cls* is (or is not) a subclass of *superclass* (which can be a class or a tuple of classes, as supported by :func:`issubclass`). To check for the exact type, use :func:`assertIs(cls, superclass) <assertIs>...
trusted_official_docs
CPython Docs
.. method:: assertIsSubclass(cls, superclass, msg=None) assertNotIsSubclass(cls, superclass, msg=None) Test that *cls* is (or is not) a subclass of *superclass* (which can be a class or a tuple of classes, as supported by :func:`issubclass`). To check for the exact type, use :func:`assertIs(cls, superclass) <assertIs>...
.. method:: assertIsSubclass(cls, superclass, msg=None) assertNotIsSubclass(cls, superclass, msg=None) Test that *cls* is (or is not) a subclass of *superclass* (which can be a class or a tuple of classes, as supported by :func:`issubclass`). To check for the exact type, use :func:`assertIs(cls, superclass) <assertIs>...
python, official-docs, cpython, P0
Local_Trusted_Corpus
27aa2151-d323-46ed-848c-2bdd46506713
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,103
supabase-export-v2
3ebac92a5f78906a
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. .. function:: main(module='__main__', defaultTest=None, argv=None, testRunner=None, \ testLoader=unittest.defaultTestLoader, exit=T...
trusted_official_docs
CPython Docs
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. .. function:: main(module='__main__', defaultTest=None, argv=None, testRunner=None, \ testLoader=unittest.defaultTestLoader, exit=T...
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. .. function:: main(module='__main__', defaultTest=None, argv=None, testRunner=None, \ testLoader=unittest.defaultTestLoader, exit=T...
python, official-docs, cpython, P0
Local_Trusted_Corpus
280ab629-c28f-43f1-bab6-d1795ba0c59a
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,918
supabase-export-v2
56cd105f3a0161c1
.. method:: run(result=None) Sets up a new event loop to run the test, collecting the result into the :class:`TestResult` object passed as *result*. If *result* is omitted or ``None``, a temporary result object is created (by calling the :meth:`~TestCase.defaultTestResult` method) and used. The result object is ret...
trusted_official_docs
CPython Docs
.. method:: run(result=None) Sets up a new event loop to run the test, collecting the result into the :class:`TestResult` object passed as *result*. If *result* is omitted or ``None``, a temporary result object is created (by calling the :meth:`~TestCase.defaultTestResult` method) and used. The result object is ret...
.. method:: run(result=None) Sets up a new event loop to run the test, collecting the result into the :class:`TestResult` object passed as *result*. If *result* is omitted or ``None``, a temporary result object is created (by calling the :meth:`~TestCase.defaultTestResult` method) and used. The result object is ret...
python, official-docs, cpython, P0
Local_Trusted_Corpus
29705dc2-5ab4-438d-8abe-4e9e51e143c9
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,704
supabase-export-v2
4e9f9635894bd67b
.. method:: subTest(msg=None, **params) Return a context manager which executes the enclosed 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.
trusted_official_docs
CPython Docs
.. method:: subTest(msg=None, **params) Return a context manager which executes the enclosed 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.
.. method:: subTest(msg=None, **params) Return a context manager which executes the enclosed 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
298468a9-f6ea-4c85-b32a-c0e4131b301c
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,559
supabase-export-v2
fc137014363dfdfe
.. note:: As a shortcut, ``python -m 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.
trusted_official_docs
CPython Docs
.. note:: As a shortcut, ``python -m 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.
.. note:: As a shortcut, ``python -m 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
29e6b965-ef2c-4a0a-a34b-2b5a6fed6fa4
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,488
supabase-export-v2
3042af9333555f3e
`pytest <https://docs.pytest.org/>`_ Third-party unittest framework with a lighter-weight syntax for writing tests. For example, ``assert func(10) == 42``. `The Python Testing Tools Taxonomy <https://wiki.python.org/moin/PythonTestingToolsTaxonomy>`_ An extensive list of Python testing tools including functional testi...
trusted_official_docs
CPython Docs
`pytest <https://docs.pytest.org/>`_ Third-party unittest framework with a lighter-weight syntax for writing tests. For example, ``assert func(10) == 42``. `The Python Testing Tools Taxonomy <https://wiki.python.org/moin/PythonTestingToolsTaxonomy>`_ An extensive list of Python testing tools including functional testi...
`pytest <https://docs.pytest.org/>`_ Third-party unittest framework with a lighter-weight syntax for writing tests. For example, ``assert func(10) == 42``. `The Python Testing Tools Taxonomy <https://wiki.python.org/moin/PythonTestingToolsTaxonomy>`_ An extensive list of Python testing tools including functional testi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2e2887c5-8c1d-4d9b-af6f-d33ec6ff9b84
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,534
supabase-export-v2
2a7bae38bc43cc72
.. option:: -c, --catch :kbd:`Control-C` during the 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.
trusted_official_docs
CPython Docs
.. option:: -c, --catch :kbd:`Control-C` during the 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.
.. option:: -c, --catch :kbd:`Control-C` during the 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2e4fcbfd-e1e4-4ca3-ab07-8cf4ea2c2795
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,089
supabase-export-v2
ce3bd63662f38a70
.. data:: defaultTestLoader Instance of the :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.
trusted_official_docs
CPython Docs
.. data:: defaultTestLoader Instance of the :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.
.. data:: defaultTestLoader Instance of the :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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2f831b6b-06d6-459b-b4b3-b6e6433366d7
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,636
supabase-export-v2
6c930b00e9e194b5
def test_maybe_skipped(self): if not external_resource_available(): self.skipTest("external resource not available") # test code that depends on the external resource pass This is the output of running the example above in verbose mode::
trusted_official_docs
CPython Docs
def test_maybe_skipped(self): if not external_resource_available(): self.skipTest("external resource not available") # test code that depends on the external resource pass This is the output of running the example above in verbose mode::
def test_maybe_skipped(self): if not external_resource_available(): self.skipTest("external resource not available") # test code that depends on the external resource pass This is the output of running the example above in verbose mode::
python, official-docs, cpython, P0
Local_Trusted_Corpus
307a1547-416b-4a12-b3ac-ea9deff9cdd5
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,937
supabase-export-v2
2ac8b4ce93350f45
suites that will be used to build the suite initially. Additional methods are provided to add test cases and suites to the collection later on. :class:`TestSuite` objects behave much like :class:`TestCase` objects, except they do not actually implement a test. Instead, they are used to aggregate tests into groups of ...
trusted_official_docs
CPython Docs
suites that will be used to build the suite initially. Additional methods are provided to add test cases and suites to the collection later on. :class:`TestSuite` objects behave much like :class:`TestCase` objects, except they do not actually implement a test. Instead, they are used to aggregate tests into groups of ...
suites that will be used to build the suite initially. Additional methods are provided to add test cases and suites to the collection later on. :class:`TestSuite` objects behave much like :class:`TestCase` objects, except they do not actually implement a test. Instead, they are used to aggregate tests into groups of ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
32cae66b-48fc-4b25-8f5b-08726246b769
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,108
supabase-export-v2
e505b0d3a9024e35
if __name__ == '__main__': unittest.main(verbosity=2) The *defaultTest* argument is either the name of a single test or an iterable of test names to run if no test names are specified via *argv*. If not specified or ``None`` and no test names are provided via *argv*, all tests found in *module* are run.
trusted_official_docs
CPython Docs
if __name__ == '__main__': unittest.main(verbosity=2) The *defaultTest* argument is either the name of a single test or an iterable of test names to run if no test names are specified via *argv*. If not specified or ``None`` and no test names are provided via *argv*, all tests found in *module* are run.
if __name__ == '__main__': unittest.main(verbosity=2) The *defaultTest* argument is either the name of a single test or an iterable of test names to run if no test names are specified via *argv*. If not specified or ``None`` and no test names are provided via *argv*, all tests found in *module* are run.
python, official-docs, cpython, P0
Local_Trusted_Corpus
32fd5bb6-c830-4f36-b76a-6a1be406181b
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,603
supabase-export-v2
c5faf050ab7217df
:mod:`!unittest`'s :class:`TestSuite` class. In most cases, calling :func:`unittest.main` will do the right thing and collect all the module's test cases for you and execute them. However, should you want to customize the building of your test suite, you can do it yourself::
trusted_official_docs
CPython Docs
:mod:`!unittest`'s :class:`TestSuite` class. In most cases, calling :func:`unittest.main` will do the right thing and collect all the module's test cases for you and execute them. However, should you want to customize the building of your test suite, you can do it yourself::
:mod:`!unittest`'s :class:`TestSuite` class. In most cases, calling :func:`unittest.main` will do the right thing and collect all the module's test cases for you and execute them. However, should you want to customize the building of your test suite, you can do it yourself::
python, official-docs, cpython, P0
Local_Trusted_Corpus
336fa454-4e5e-4a38-b7a8-1b24fd8e7ad2
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,129
supabase-export-v2
bb1b336fc435405c
want to add or remove tests from the standard set of tests. The third argument is used when loading packages as part of test discovery. A typical ``load_tests`` function that loads tests from a specific set of :class:`TestCase` classes may look like::
trusted_official_docs
CPython Docs
want to add or remove tests from the standard set of tests. The third argument is used when loading packages as part of test discovery. A typical ``load_tests`` function that loads tests from a specific set of :class:`TestCase` classes may look like::
want to add or remove tests from the standard set of tests. The third argument is used when loading packages as part of test discovery. A typical ``load_tests`` function that loads tests from a specific set of :class:`TestCase` classes may look like::
python, official-docs, cpython, P0
Local_Trusted_Corpus
342588b5-1ea3-4f9c-bc40-5a86d4be8787
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,892
supabase-export-v2
11b6507ae978bf79
.. classmethod:: addClassCleanup(function, /, *args, **kwargs) Add a function to be called after :meth:`tearDownClass` to cleanup resources used during the test class. 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 keyw...
trusted_official_docs
CPython Docs
.. classmethod:: addClassCleanup(function, /, *args, **kwargs) Add a function to be called after :meth:`tearDownClass` to cleanup resources used during the test class. 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 keyw...
.. classmethod:: addClassCleanup(function, /, *args, **kwargs) Add a function to be called after :meth:`tearDownClass` to cleanup resources used during the test class. 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 keyw...
python, official-docs, cpython, P0
Local_Trusted_Corpus
36187a0e-b351-42b5-8cc3-82c90ba341c9
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,595
supabase-export-v2
dd030a335e70f983
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. If the :meth:`~TestCase.setUp` method raises an exception while the test is running, the framework will consider the test to have suffered an error, and the test method will not...
trusted_official_docs
CPython Docs
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. If the :meth:`~TestCase.setUp` method raises an exception while the test is running, the framework will consider the test to have suffered an error, and the test method will not...
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. If the :meth:`~TestCase.setUp` method raises an exception while the test is running, the framework will consider the test to have suffered an error, and the test method will not...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3627f598-afea-49c8-876b-f9bedeb3819d
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,752
supabase-export-v2
88ab7441c9082d82
.. method:: assertRaisesRegex(exception, regex, callable, *args, **kwds) assertRaisesRegex(exception, regex, *, msg=None) Like :meth:`assertRaises` but also tests that *regex* matches on the string representation of the raised exception. *regex* may be a regular expression object or a string containing a regular expr...
trusted_official_docs
CPython Docs
.. method:: assertRaisesRegex(exception, regex, callable, *args, **kwds) assertRaisesRegex(exception, regex, *, msg=None) Like :meth:`assertRaises` but also tests that *regex* matches on the string representation of the raised exception. *regex* may be a regular expression object or a string containing a regular expr...
.. method:: assertRaisesRegex(exception, regex, callable, *args, **kwds) assertRaisesRegex(exception, regex, *, msg=None) Like :meth:`assertRaises` but also tests that *regex* matches on the string representation of the raised exception. *regex* may be a regular expression object or a string containing a regular expr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
37c45d47-f366-43b8-9222-6139c4d74341
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,824
supabase-export-v2
5c2df63d0d247cb6
.. method:: assertStartsWith(s, prefix, msg=None) .. method:: assertNotStartsWith(s, prefix, msg=None) Test that the Unicode or byte string *s* starts (or does not start) with a *prefix*. *prefix* can also be a tuple of strings to try.
trusted_official_docs
CPython Docs
.. method:: assertStartsWith(s, prefix, msg=None) .. method:: assertNotStartsWith(s, prefix, msg=None) Test that the Unicode or byte string *s* starts (or does not start) with a *prefix*. *prefix* can also be a tuple of strings to try.
.. method:: assertStartsWith(s, prefix, msg=None) .. method:: assertNotStartsWith(s, prefix, msg=None) Test that the Unicode or byte string *s* starts (or does not start) with a *prefix*. *prefix* can also be a tuple of strings to try.
python, official-docs, cpython, P0
Local_Trusted_Corpus
38579738-60be-4a79-b046-732a5a016d3d
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,589
supabase-export-v2
47f08e7643523787
will be raised with an explanatory message, and :mod:`!unittest` will identify the test case as a :dfn:`failure`. Any other exceptions will be treated as :dfn:`errors`. Tests can be numerous, and their set-up can be repetitive. Luckily, we can factor out set-up code by implementing a method called :meth:`~TestCase.setU...
trusted_official_docs
CPython Docs
will be raised with an explanatory message, and :mod:`!unittest` will identify the test case as a :dfn:`failure`. Any other exceptions will be treated as :dfn:`errors`. Tests can be numerous, and their set-up can be repetitive. Luckily, we can factor out set-up code by implementing a method called :meth:`~TestCase.setU...
will be raised with an explanatory message, and :mod:`!unittest` will identify the test case as a :dfn:`failure`. Any other exceptions will be treated as :dfn:`errors`. Tests can be numerous, and their set-up can be repetitive. Luckily, we can factor out set-up code by implementing a method called :meth:`~TestCase.setU...
python, official-docs, cpython, P0
Local_Trusted_Corpus
39aa0b27-e34f-47c4-9b6a-5ed921b1bfa8
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,596
supabase-export-v2
1eaa6b1a4d4a292b
exception while the test is running, the framework will consider the test to have suffered an error, and the test method will not be executed. Similarly, we can provide a :meth:`~TestCase.tearDown` method that tidies up after the test method has been run::
trusted_official_docs
CPython Docs
exception while the test is running, the framework will consider the test to have suffered an error, and the test method will not be executed. Similarly, we can provide a :meth:`~TestCase.tearDown` method that tidies up after the test method has been run::
exception while the test is running, the framework will consider the test to have suffered an error, and the test method will not be executed. Similarly, we can provide a :meth:`~TestCase.tearDown` method that tidies up after the test method has been run::
python, official-docs, cpython, P0
Local_Trusted_Corpus
39fb1c8d-3a0e-4893-b53d-604426719174
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,503
supabase-export-v2
09479f15b1e77d24
exception gets raised. These methods are used instead of the :keyword:`assert` statement so the test runner can accumulate all test results and produce a report. The :meth:`~TestCase.setUp` and :meth:`~TestCase.tearDown` methods allow you to define instructions that will be executed before and after each test method. T...
trusted_official_docs
CPython Docs
exception gets raised. These methods are used instead of the :keyword:`assert` statement so the test runner can accumulate all test results and produce a report. The :meth:`~TestCase.setUp` and :meth:`~TestCase.tearDown` methods allow you to define instructions that will be executed before and after each test method. T...
exception gets raised. These methods are used instead of the :keyword:`assert` statement so the test runner can accumulate all test results and produce a report. The :meth:`~TestCase.setUp` and :meth:`~TestCase.tearDown` methods allow you to define instructions that will be executed before and after each test method. T...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3fa8d67a-143d-4527-adcf-0467e65f9243
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,551
supabase-export-v2
955e130d202297f5
.. versionadded:: 3.12 The command-line option ``--durations``. The command line can also be used for test discovery, for running all of the tests in a project or just a subset.
trusted_official_docs
CPython Docs
.. versionadded:: 3.12 The command-line option ``--durations``. The command line can also be used for test discovery, for running all of the tests in a project or just a subset.
.. versionadded:: 3.12 The command-line option ``--durations``. The command line can also be used for test discovery, for running all of the tests in a project or just a subset.
python, official-docs, cpython, P0
Local_Trusted_Corpus
40aff3d0-a9ea-4a44-8f89-ad29a3c9d130
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,610
supabase-export-v2
52efba95dd801458
* There is less temptation to change test code to fit the code it tests without a good reason. * Test code should be modified much less frequently than the code it tests.
trusted_official_docs
CPython Docs
* There is less temptation to change test code to fit the code it tests without a good reason. * Test code should be modified much less frequently than the code it tests.
* There is less temptation to change test code to fit the code it tests without a good reason. * Test code should be modified much less frequently than the code it tests.
python, official-docs, cpython, P0
Local_Trusted_Corpus
40e2875d-48fd-4e59-907a-99504121d9af
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,116
supabase-export-v2
55e798d1c0e546a9
not specified, it will remain ``None`` if a :option:`!-W` option is passed to :program:`python` (see :ref:`Warning control <using-on-warnings>`), otherwise it will be set to ``'default'``. Calling ``main`` returns an object with the ``result`` attribute that contains the result of the tests run as a :class:`unittest.T...
trusted_official_docs
CPython Docs
not specified, it will remain ``None`` if a :option:`!-W` option is passed to :program:`python` (see :ref:`Warning control <using-on-warnings>`), otherwise it will be set to ``'default'``. Calling ``main`` returns an object with the ``result`` attribute that contains the result of the tests run as a :class:`unittest.T...
not specified, it will remain ``None`` if a :option:`!-W` option is passed to :program:`python` (see :ref:`Warning control <using-on-warnings>`), otherwise it will be set to ``'default'``. Calling ``main`` returns an object with the ``result`` attribute that contains the result of the tests run as a :class:`unittest.T...
python, official-docs, cpython, P0
Local_Trusted_Corpus
41468578-c23e-49fa-abca-50399e9c1c6d
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,646
supabase-export-v2
1303280b118ccc0f
calls :func:`skip` on the test when it wants it to be skipped. This decorator skips the test unless the passed object has a certain attribute:: def skipUnlessHasattr(obj, attr): if hasattr(obj, attr): return lambda func: func return unittest.skip("{!r} doesn't have {!r}".format(obj, attr))
trusted_official_docs
CPython Docs
calls :func:`skip` on the test when it wants it to be skipped. This decorator skips the test unless the passed object has a certain attribute:: def skipUnlessHasattr(obj, attr): if hasattr(obj, attr): return lambda func: func return unittest.skip("{!r} doesn't have {!r}".format(obj, attr))
calls :func:`skip` on the test when it wants it to be skipped. This decorator skips the test unless the passed object has a certain attribute:: def skipUnlessHasattr(obj, attr): if hasattr(obj, attr): return lambda func: func return unittest.skip("{!r} doesn't have {!r}".format(obj, attr))
python, official-docs, cpython, P0
Local_Trusted_Corpus
417807d1-7934-4060-b2f5-18f0afccb8b9
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,617
supabase-export-v2
e56e1e66f9672b5f
find that they have existing test code that they would like to run from :mod:`!unittest`, without converting every old test function to a :class:`TestCase` subclass. For this reason, :mod:`!unittest` provides a :class:`FunctionTestCase` class. This subclass of :class:`TestCase` can be used to wrap an existing test func...
trusted_official_docs
CPython Docs
find that they have existing test code that they would like to run from :mod:`!unittest`, without converting every old test function to a :class:`TestCase` subclass. For this reason, :mod:`!unittest` provides a :class:`FunctionTestCase` class. This subclass of :class:`TestCase` can be used to wrap an existing test func...
find that they have existing test code that they would like to run from :mod:`!unittest`, without converting every old test function to a :class:`TestCase` subclass. For this reason, :mod:`!unittest` provides a :class:`FunctionTestCase` class. This subclass of :class:`TestCase` can be used to wrap an existing test func...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4182150b-9132-47e0-a849-fcdc995b38bf
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,970
supabase-export-v2
0548f267c404834a
be instantiated directly does not play well with this method. Doing so, however, can be useful when the fixtures are different and defined in subclasses. If a module provides a ``load_tests`` function it will be called to load the tests. This allows modules to customize test loading. This is the `load_tests protocol`_...
trusted_official_docs
CPython Docs
be instantiated directly does not play well with this method. Doing so, however, can be useful when the fixtures are different and defined in subclasses. If a module provides a ``load_tests`` function it will be called to load the tests. This allows modules to customize test loading. This is the `load_tests protocol`_...
be instantiated directly does not play well with this method. Doing so, however, can be useful when the fixtures are different and defined in subclasses. If a module provides a ``load_tests`` function it will be called to load the tests. This allows modules to customize test loading. This is the `load_tests protocol`_...
python, official-docs, cpython, P0
Local_Trusted_Corpus
41830071-07a1-4afe-a6f7-554c285e0e9c
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,800
supabase-export-v2
ae7995929fcc5058
A context manager to test that no messages are logged on the *logger* or one of its children, with at least the given *level*. If given, *logger* should be a :class:`logging.Logger` object or a :class:`str` giving the name of a logger. The default is the root logger, which will catch all messages.
trusted_official_docs
CPython Docs
A context manager to test that no messages are logged on the *logger* or one of its children, with at least the given *level*. If given, *logger* should be a :class:`logging.Logger` object or a :class:`str` giving the name of a logger. The default is the root logger, which will catch all messages.
A context manager to test that no messages are logged on the *logger* or one of its children, with at least the given *level*. If given, *logger* should be a :class:`logging.Logger` object or a :class:`str` giving the name of a logger. The default is the root logger, which will catch all messages.
python, official-docs, cpython, P0
Local_Trusted_Corpus
41b00b73-ea9d-4a77-8abe-1cb8c0dba4a7
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,931
supabase-export-v2
91ed598be25a18ee
.. class:: FunctionTestCase(testFunc, setUp=None, tearDown=None, description=None) This class implements the portion of the :class:`TestCase` interface which allows the test runner to drive the test, but does not provide the methods which test code can use to check and report errors. This is used to create test case...
trusted_official_docs
CPython Docs
.. class:: FunctionTestCase(testFunc, setUp=None, tearDown=None, description=None) This class implements the portion of the :class:`TestCase` interface which allows the test runner to drive the test, but does not provide the methods which test code can use to check and report errors. This is used to create test case...
.. class:: FunctionTestCase(testFunc, setUp=None, tearDown=None, description=None) This class implements the portion of the :class:`TestCase` interface which allows the test runner to drive the test, but does not provide the methods which test code can use to check and report errors. This is used to create test case...
python, official-docs, cpython, P0
Local_Trusted_Corpus
43451153-ac62-4b8a-9c80-405add84506b
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,532
supabase-export-v2
b3a358a5be5f25ad
.. option:: -b, --buffer The standard output and standard error streams are buffered during the test run. Output during a passing test is discarded. Output is echoed normally on test fail or error and is added to the failure messages.
trusted_official_docs
CPython Docs
.. option:: -b, --buffer The standard output and standard error streams are buffered during the test run. Output during a passing test is discarded. Output is echoed normally on test fail or error and is added to the failure messages.
.. option:: -b, --buffer The standard output and standard error streams are buffered during the test run. Output during a passing test is discarded. Output is echoed normally on test fail or error and is added to the failure messages.
python, official-docs, cpython, P0
Local_Trusted_Corpus
43ba8f90-50d0-466d-89d3-2ce111b674f0
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,850
supabase-export-v2
c9748b90cc690560
an error message is constructed that lists the differences between the sets. This method is used by default when comparing sets or frozensets with :meth:`assertEqual`. Fails if either of *first* or *second* does not have a :meth:`~frozenset.difference` method.
trusted_official_docs
CPython Docs
an error message is constructed that lists the differences between the sets. This method is used by default when comparing sets or frozensets with :meth:`assertEqual`. Fails if either of *first* or *second* does not have a :meth:`~frozenset.difference` method.
an error message is constructed that lists the differences between the sets. This method is used by default when comparing sets or frozensets with :meth:`assertEqual`. Fails if either of *first* or *second* does not have a :meth:`~frozenset.difference` method.
python, official-docs, cpython, P0
Local_Trusted_Corpus
4409c068-0c97-4966-b4cc-30c72a01b7d8
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,570
supabase-export-v2
2940915ebebdfda6
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 -m unittest discover -s project_directory -p "*_test.py" python -m unittest discover project_directory "*_test.py"
trusted_official_docs
CPython Docs
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 -m unittest discover -s project_directory -p "*_test.py" python -m unittest discover project_directory "*_test.py"
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 -m unittest discover -s project_directory -p "*_test.py" python -m unittest discover project_directory "*_test.py"
python, official-docs, cpython, P0
Local_Trusted_Corpus
44eeab1d-ecc3-4614-8c7a-dd6452ff1ff0
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,584
supabase-export-v2
cff98ce1359c0567
correctness. In :mod:`!unittest`, test cases are represented by :class:`unittest.TestCase` instances. To make your own test cases you must write subclasses of :class:`TestCase` or use :class:`FunctionTestCase`. The testing code of a :class:`TestCase` instance should be entirely self contained, such that it can be run e...
trusted_official_docs
CPython Docs
correctness. In :mod:`!unittest`, test cases are represented by :class:`unittest.TestCase` instances. To make your own test cases you must write subclasses of :class:`TestCase` or use :class:`FunctionTestCase`. The testing code of a :class:`TestCase` instance should be entirely self contained, such that it can be run e...
correctness. In :mod:`!unittest`, test cases are represented by :class:`unittest.TestCase` instances. To make your own test cases you must write subclasses of :class:`TestCase` or use :class:`FunctionTestCase`. The testing code of a :class:`TestCase` instance should be entirely self contained, such that it can be run e...
python, official-docs, cpython, P0
Local_Trusted_Corpus
44f946ac-2022-4fae-9c37-7309ef813231
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,909
supabase-export-v2
ab486305376b4208
.. method:: asyncSetUp() :async: Method called to prepare the test fixture. This is called after :meth:`TestCase.setUp`. This is called immediately before calling the test method; other than :exc:`AssertionError` or :exc:`SkipTest`, any exception raised by this method will be considered an error rather than a test fa...
trusted_official_docs
CPython Docs
.. method:: asyncSetUp() :async: Method called to prepare the test fixture. This is called after :meth:`TestCase.setUp`. This is called immediately before calling the test method; other than :exc:`AssertionError` or :exc:`SkipTest`, any exception raised by this method will be considered an error rather than a test fa...
.. method:: asyncSetUp() :async: Method called to prepare the test fixture. This is called after :meth:`TestCase.setUp`. This is called immediately before calling the test method; other than :exc:`AssertionError` or :exc:`SkipTest`, any exception raised by this method will be considered an error rather than a test fa...
python, official-docs, cpython, P0
Local_Trusted_Corpus
459ee4b6-101d-4baa-b43e-adb8d4324e17
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,986
supabase-export-v2
b664e571f83524a1
that match *pattern* will be loaded. (Using shell style pattern matching.) Only module names that are importable (i.e. are valid Python identifiers) will be loaded. All test modules must be importable from the top level of the project. If the start directory is not the top level directory then *top_level_dir* must be...
trusted_official_docs
CPython Docs
that match *pattern* will be loaded. (Using shell style pattern matching.) Only module names that are importable (i.e. are valid Python identifiers) will be loaded. All test modules must be importable from the top level of the project. If the start directory is not the top level directory then *top_level_dir* must be...
that match *pattern* will be loaded. (Using shell style pattern matching.) Only module names that are importable (i.e. are valid Python identifiers) will be loaded. All test modules must be importable from the top level of the project. If the start directory is not the top level directory then *top_level_dir* must be...
python, official-docs, cpython, P0
Local_Trusted_Corpus
45eb7759-cded-4d56-bb08-fad6df733258
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,935
supabase-export-v2
ce1c54d4338e0910
.. class:: TestSuite(tests=()) This class represents an aggregation of individual test cases and test suites. The class presents the interface needed by the test runner to allow it to be run as any other test case. Running a :class:`TestSuite` instance is the same as iterating over the suite, running each test indivi...
trusted_official_docs
CPython Docs
.. class:: TestSuite(tests=()) This class represents an aggregation of individual test cases and test suites. The class presents the interface needed by the test runner to allow it to be run as any other test case. Running a :class:`TestSuite` instance is the same as iterating over the suite, running each test indivi...
.. class:: TestSuite(tests=()) This class represents an aggregation of individual test cases and test suites. The class presents the interface needed by the test runner to allow it to be run as any other test case. Running a :class:`TestSuite` instance is the same as iterating over the suite, running each test indivi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4827cca4-9a55-4778-a709-22aab5228a31
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,512
supabase-export-v2
82cefe52c9fc8e2d
used :mod:`!unittest` features which are sufficient to meet many everyday testing needs. The remainder of the documentation explores the full feature set from first principles. .. versionchanged:: 3.11 The behavior of returning a value from a test method (other than the default ``None`` value), is now deprecated.
trusted_official_docs
CPython Docs
used :mod:`!unittest` features which are sufficient to meet many everyday testing needs. The remainder of the documentation explores the full feature set from first principles. .. versionchanged:: 3.11 The behavior of returning a value from a test method (other than the default ``None`` value), is now deprecated.
used :mod:`!unittest` features which are sufficient to meet many everyday testing needs. The remainder of the documentation explores the full feature set from first principles. .. versionchanged:: 3.11 The behavior of returning a value from a test method (other than the default ``None`` value), is now deprecated.
python, official-docs, cpython, P0
Local_Trusted_Corpus
4938574b-1cf5-4cd1-880b-e592404d1cd0
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,838
supabase-export-v2
61f2f6ed8075f752
or frozensets | 3.1 | | <TestCase.assertSetEqual>` | | | +-----------------------------------------+-----------------------------+--------------+ | :meth:`assertDictEqual(a, b) | dicts | 3.1 | | <TestCase.assertDictEqual>` | | | +-----------------------------------------+-----------------------------+--------------+ .....
trusted_official_docs
CPython Docs
or frozensets | 3.1 | | <TestCase.assertSetEqual>` | | | +-----------------------------------------+-----------------------------+--------------+ | :meth:`assertDictEqual(a, b) | dicts | 3.1 | | <TestCase.assertDictEqual>` | | | +-----------------------------------------+-----------------------------+--------------+ .....
or frozensets | 3.1 | | <TestCase.assertSetEqual>` | | | +-----------------------------------------+-----------------------------+--------------+ | :meth:`assertDictEqual(a, b) | dicts | 3.1 | | <TestCase.assertDictEqual>` | | | +-----------------------------------------+-----------------------------+--------------+ .....
python, official-docs, cpython, P0
Local_Trusted_Corpus
49490322-1ffe-4744-944f-299fbc1607fc
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,528
supabase-export-v2
5b574ea4f528058c
.. versionchanged:: 3.2 In earlier versions it was only possible to run individual test methods and not modules or classes. .. versionadded:: 3.14 Output is colorized by default and can be :ref:`controlled using environment variables <using-on-controlling-color>`.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.2 In earlier versions it was only possible to run individual test methods and not modules or classes. .. versionadded:: 3.14 Output is colorized by default and can be :ref:`controlled using environment variables <using-on-controlling-color>`.
.. versionchanged:: 3.2 In earlier versions it was only possible to run individual test methods and not modules or classes. .. versionadded:: 3.14 Output is colorized by default and can be :ref:`controlled using environment variables <using-on-controlling-color>`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
4a250c65-1cdb-4613-b30f-01505dfb6094
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
42,176
supabase-export-v2
4bec323cc61c2dd5
code that replaces an installed handler and delegates to it. For individual tests that need ``unittest`` control-c handling disabled the :func:`removeHandler` decorator can be used. There are a few utility functions for framework authors to enable control-c handling functionality within test frameworks.
trusted_official_docs
CPython Docs
code that replaces an installed handler and delegates to it. For individual tests that need ``unittest`` control-c handling disabled the :func:`removeHandler` decorator can be used. There are a few utility functions for framework authors to enable control-c handling functionality within test frameworks.
code that replaces an installed handler and delegates to it. For individual tests that need ``unittest`` control-c handling disabled the :func:`removeHandler` decorator can be used. There are a few utility functions for framework authors to enable control-c handling functionality within test frameworks.
python, official-docs, cpython, P0
Local_Trusted_Corpus
4a3d4676-ee5c-4208-8478-b790ac20e86c
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,711
supabase-export-v2
aa2e1408b7934bbc
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): +-----------------------------------------+-----------------------------+---------------+ | Method | Checks that | New in | +=======================================...
trusted_official_docs
CPython Docs
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): +-----------------------------------------+-----------------------------+---------------+ | Method | Checks that | New in | +=======================================...
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): +-----------------------------------------+-----------------------------+---------------+ | Method | Checks that | New in | +=======================================...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4af0363b-326e-466d-9687-55f83547e91c
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,483
supabase-export-v2
14da6020841455f9
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. test runner A :dfn:`test runner` is a component which orchestrates the execution of tests and provides the outcome to the user. The runner may use a graphical interface, a te...
trusted_official_docs
CPython Docs
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. test runner A :dfn:`test runner` is a component which orchestrates the execution of tests and provides the outcome to the user. The runner may use a graphical interface, a te...
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. test runner A :dfn:`test runner` is a component which orchestrates the execution of tests and provides the outcome to the user. The runner may use a graphical interface, a te...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4ba5b2a9-c154-426e-8894-9c43b4930227
CPython Docs
file://datasets/cpython/Doc/library/unittest.rst
unknown
9631c318-9739-45cd-9e68-6c9a3439030e
41,508
supabase-export-v2
414228188827d082
Passing the ``-v`` option to your test script will instruct :func:`unittest.main` to enable a higher level of verbosity, and produce the following output:: test_isupper (__main__.TestStringMethods.test_isupper) ... ok test_split (__main__.TestStringMethods.test_split) ... ok test_upper (__main__.TestStringMethods.tes...
trusted_official_docs
CPython Docs
Passing the ``-v`` option to your test script will instruct :func:`unittest.main` to enable a higher level of verbosity, and produce the following output:: test_isupper (__main__.TestStringMethods.test_isupper) ... ok test_split (__main__.TestStringMethods.test_split) ... ok test_upper (__main__.TestStringMethods.tes...
Passing the ``-v`` option to your test script will instruct :func:`unittest.main` to enable a higher level of verbosity, and produce the following output:: test_isupper (__main__.TestStringMethods.test_isupper) ... ok test_split (__main__.TestStringMethods.test_split) ... ok test_upper (__main__.TestStringMethods.tes...
python, official-docs, cpython, P0
Local_Trusted_Corpus