Name Description Size
acceptance_test.py def pytest_sessionstart(): 0 / 0 44335
code
conftest.py Restore tracing function (when run with Coverage.py). https://bugs.python.org/issue37011 6443
deprecated_test.py def test_one(): assert 1 def test_two(): assert 1 def test_three(): assert 1 9648
example_scripts
examples
freeze
io
logging
plugins_integration
python
test_argcomplete.py File completer class, optionally takes a list of allowed extensions. 3177
test_assertion.py Test that conftest files are using assertion rewrite on import (#1619). 54343
test_assertrewrite.py Rewrite the assertions in f, run it, and get the failure message. 58959
test_cacheprovider.py def pytest_configure(config): # see that we get cache information early on assert hasattr(config, "cache") 43037
test_capture.py \ # taken from issue 227 from nosetests def test_unicode(): import sys print(sys.stdout) print(%s) 51864
test_collection.py Ensure that file exists 53110
test_compat.py Check that get_real_func correctly unwraps decorators until reaching the real function 6516
test_config.py \ [{section}] name = value 69287
test_conftest.py 22800
test_debugging.py def test_func(): assert 0 42953
test_doctest.py # This is a function # >>> # it doesn't have any doctest 48157
test_entry_points.py 272
test_error_diffs.py Tests and examples for correct "+/-" usage in error diffs. See https://github.com/pytest-dev/pytest/issues/3333 for details. 8499
test_faulthandler.py Test single crashing test displays a traceback. 5123
test_findpaths.py pytest.ini files are always considered for configuration, even if empty 5379
test_helpconfig.py Regression check for the public version attributes in pytest. 4121
test_junitxml.py Return an xmlschema.XMLSchema object for the junit-10.xsd file. 55856
test_legacypath.py Check test_tmproot is a py.path attribute for backward compatibility. 5778
test_link_resolve.py See: https://github.com/pytest-dev/pytest/issues/5965. 2289
test_main.py import pytest def pytest_sessionstart(): raise {exc}("boom") def pytest_internalerror(excrepr, excinfo): returncode = {returncode!r} if returncode is not False: pytest.exit("exiting after %s..." % excinfo.typename, returncode={returncode!r}) 9287
test_mark.py Test fails file is run twice that contains marked class. See issue#683. 33980
test_mark_expression.py When generating nodeids, if the source name contains special characters like a newline, they are escaped into two characters like \n. Therefore, a user will never need to insert a literal newline, only \n (two chars). So mark expressions themselves do not support escaping, instead they treat backslashes as regular identifier characters. 5448
test_meta.py Test importing of all internal packages and modules. This ensures all internal packages can be imported without needing the pytest namespace being set, which is critical for the initialization of xdist. 780
test_monkeypatch.py 12327
test_nodes.py Verifies we warn on diamond inheritance as well as correctly managing legacy inheritance constructors with missing args as found in plugins. 5280
test_nose.py values = [] from nose.tools import with_setup @with_setup(lambda: values.append(1), lambda: values.append(2)) def test_hello(): assert values == [1] def test_world(): assert values == [1,2] test_hello.setup = lambda: values.append(1) test_hello.teardown = lambda: values.append(2) 12607
test_parseopt.py Custom prog can be set for `argparse.ArgumentParser`. 14194
test_pastebin.py import pytest def test_pass() -> None: pass def test_fail(): assert 0 def test_skip(): pytest.skip("") 6199
test_pathlib.py Test our port of py.common.FNMatcher (fnmatch_ex). 20867
test_pluginmanager.py def pytest_myhook(xyz): "new hook" 15392
test_pytester.py >>> import os >>> pytester = getfixture("pytester") >>> str(pytester.makepyfile("content")).replace(os.sep, '/') '.../basetemp/sub.t-doctest0/sub.py' 27907
test_python_path.py from foo import foo def test_foo(): assert foo() == 1 3398
test_recwarn.py import warnings def test_method(recwarn): warnings.warn("hello") warn = recwarn.pop() assert isinstance(warn.message, UserWarning) 15180
test_reports.py Regarding issue pytest-xdist#241. This test came originally from test_remote.py in xdist (ca03269). 19241
test_runner.py def setup_module(mod): raise ValueError(42) def test_func(): pass 33252
test_runner_xunit.py Test correct setup/teardowns at module, class, and instance level. 7855
test_scope.py 1346
test_session.py def test_one(): pass def test_one_one(): assert 0 def test_other(): raise ValueError(23) class TestClass(object): def test_two(self, someargs): pass 12515
test_setuponly.py import pytest @pytest.fixture def _arg0(): """hidden arg0 fixture""" @pytest.fixture def arg1(): """arg1 docstring""" def test_arg1(arg1): pass 8161
test_setupplan.py Verify that fixtures are not executed. 3498
test_skipping.py import pytest @pytest.mark.xfail def test_func(): pass 44570
test_stash.py 1840
test_stepwise.py def pytest_addoption(parser): group = parser.getgroup('general') group.addoption('--fail', action='store_true', dest='fail') group.addoption('--fail-last', action='store_true', dest='fail_last') 8608
test_terminal.py Terminal reporting of the full testing process. 82735
test_threadexception.py import threading def test_it(): def oops(): raise ValueError("Oops") t = threading.Thread(target=oops, name="MyThread") t.start() t.join() def test_2(): pass 4085
test_tmpdir.py #4425 15270
test_unittest.py import unittest class MyTestCase(unittest.TestCase): def testpassing(self): self.assertEqual('foo', 'foo') def test_failing(self): self.assertEqual('foo', 'bar') 44016
test_unraisableexception.py class BrokenDel: def __del__(self): raise ValueError("del is broken") def test_it(): obj = BrokenDel() del obj def test_2(): pass 3922
test_warning_types.py Make sure all warnings declared in _pytest.warning_types are displayed as coming from 'pytest' instead of the internal module (#5452). 1119
test_warnings.py Create a test file which calls a function in a module which generates warnings. 25424
typing_checks.py File for checking typing issues. This file is not executed, it is only checked by mypy to ensure that none of the code triggers any mypy errors. 558