Repository Analysis

pytest-dev/pytest

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing

20.1 Moderate AI signal View on GitHub
20.1
Adjusted Score
20.1
Raw Score
100%
Time Factor
2026-05-30
Last Push
13,879
Stars
Python
Language
109,969
Lines of Code
279
Files
2663
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 41MEDIUM 47LOW 2575

Pattern Findings

2663 matches across 16 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers2033 hits · 1398 pts
SeverityFileLineSnippet
LOWtesting/test_legacypath.py30def test_testdir_makefile_dot_prefixes_extension_silently(
LOWtesting/test_legacypath.py38def test_testdir_makefile_ext_none_raises_type_error(testdir: Testdir) -> None:
LOWtesting/test_legacypath.py44def test_testdir_makefile_ext_empty_string_makes_file(testdir: Testdir) -> None:
LOWtesting/test_legacypath.py68def test_tmpdir_equals_tmp_path(tmpdir: LEGACY_PATH, tmp_path: Path) -> None:
LOWtesting/test_legacypath.py72def test_tmpdir_always_is_realpath(pytester: pytest.Pytester) -> None:
LOWtesting/test_legacypath.py94def test_fixturerequest_getmodulepath(pytester: pytest.Pytester) -> None:
LOWtesting/test_legacypath.py108 def test_session_scoped_unavailable_attributes(self, session_request):
LOWtesting/test_legacypath.py172def test_inifile_from_cmdline_main_hook(pytester: pytest.Pytester) -> None:
LOWtesting/test_setuponly.py16def test_show_only_active_fixtures(
LOWtesting/test_setuponly.py42def test_show_different_scopes(pytester: Pytester, mode) -> None:
LOWtesting/test_setuponly.py71def test_show_nested_fixtures(pytester: Pytester, mode) -> None:
LOWtesting/test_setuponly.py105def test_show_fixtures_with_autouse(pytester: Pytester, mode) -> None:
LOWtesting/test_setuponly.py132def test_show_fixtures_with_parameters(pytester: Pytester, mode) -> None:
LOWtesting/test_setuponly.py165def test_show_fixtures_with_parameter_ids(pytester: Pytester, mode) -> None:
LOWtesting/test_setuponly.py194def test_show_fixtures_with_parameter_ids_function(pytester: Pytester, mode) -> None:
LOWtesting/test_setuponly.py214def test_dynamic_fixture_request(pytester: Pytester) -> None:
LOWtesting/test_setuponly.py219 def dynamically_requested_fixture():
LOWtesting/test_setuponly.py262def test_show_fixtures_and_execute_test(pytester: Pytester) -> None:
LOWtesting/test_setuponly.py307def test_show_fixture_action_with_bytes(pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1577 def test_assertion_walrus_operator_dont_rewrite(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1596 def test_assertion_inline_walrus_operator(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1611 def test_assertion_inline_walrus_operator_reverse(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1626 def test_assertion_walrus_no_variable_name_conflict(
LOWtesting/test_assertrewrite.py1640 def test_assertion_walrus_operator_true_assertion_and_changes_variable_value(
LOWtesting/test_assertrewrite.py1654 def test_assertion_walrus_operator_fail_assertion(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1666 def test_assertion_walrus_operator_boolean_composite(
LOWtesting/test_assertrewrite.py1680 def test_assertion_walrus_operator_compare_boolean_fails(
LOWtesting/test_assertrewrite.py1694 def test_assertion_walrus_operator_boolean_none_fails(
LOWtesting/test_assertrewrite.py1708 def test_assertion_walrus_operator_value_changes_cleared_after_each_test(
LOWtesting/test_assertrewrite.py1725 def test_assertion_namedexpr_compare_left_overwrite(
LOWtesting/test_assertrewrite.py1767 def test_assertion_walrus_operator_equals_operand_function(
LOWtesting/test_assertrewrite.py1782 def test_assertion_walrus_operator_equals_operand_function_keyword_arg(
LOWtesting/test_assertrewrite.py1797 def test_assertion_walrus_operator_equals_operand_function_arg_as_function(
LOWtesting/test_assertrewrite.py1812 def test_assertion_walrus_operator_gt_operand_function(
LOWtesting/test_assertrewrite.py77 def test_place_initial_imports(self) -> None:
LOWtesting/test_assertrewrite.py142 def test_positions_are_preserved(self) -> None:
LOWtesting/test_assertrewrite.py359 def test_rewrites_plugin_as_a_package(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py428 def test_assertrepr_compare_same_width(self, request) -> None:
LOWtesting/test_assertrewrite.py448 def test_dont_rewrite_if_hasattr_fails(self, request) -> None:
LOWtesting/test_assertrewrite.py474 def test_assert_already_has_message(self) -> None:
LOWtesting/test_assertrewrite.py493 def test_assertion_message_multiline(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py506 def test_assertion_message_tuple(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py517 def test_assertion_message_expr(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py528 def test_assertion_message_escape(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py541 def test_assertion_messages_bytes(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py547 def test_assertion_message_verbosity(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py654 def test_short_circuit_evaluation(self) -> None:
LOWtesting/test_assertrewrite.py729 def test_starred_with_side_effect(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py898 def test_assert_raising__bool__in_comparison(self) -> None:
LOWtesting/test_assertrewrite.py919 def test_assert_handling_raise_in__iter__(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py962 def test_custom_repr_non_ascii(self) -> None:
LOWtesting/test_assertrewrite.py1038 def test_load_resource_via_files_with_rewrite(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1186 def test_package_without__init__py(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1203 def test_rewrite_warning_ignore(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1219 def test_rewrite_module_imported_from_conftest(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1253 def test_rewrite_warning_using_pytest_plugins(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1268 def test_rewrite_warning_using_pytest_plugins_env_var(
LOWtesting/test_assertrewrite.py1313 def test_resources_provider_for_loader(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1537 def test_rewrite_python_files_contain_subdirs(self, pytester: Pytester) -> None:
LOWtesting/test_assertrewrite.py1559 def test_assertion_walrus_operator(self, pytester: Pytester) -> None:
1973 more matches not shown…
Unused Imports348 hits · 302 pts
SeverityFileLineSnippet
LOWbench/bench_argcomplete.py5
LOWbench/unit_test.py1
LOWbench/unit_test.py3
LOWbench/skip.py1
LOWbench/manyparam.py1
LOWbench/empty.py1
LOWbench/bench.py1
LOWbench/bench.py10
LOWbench/xunit.py1
LOWtesting/test_legacypath.py2
LOWtesting/test_setuponly.py2
LOWtesting/test_assertrewrite.py2
LOWtesting/test_subtests.py1
LOWtesting/conftest.py2
LOWtesting/test_collect_imported_tests.py3
LOWtesting/test_warnings.py2
LOWtesting/test_warnings.py843
LOWtesting/test_mark.py2
LOWtesting/test_faulthandler.py2
LOWtesting/test_recwarn.py2
LOWtesting/test_session.py2
LOWtesting/test_skipping.py2
LOWtesting/test_python_path.py2
LOWtesting/test_pastebin.py2
LOWtesting/test_conftest.py2
LOWtesting/test_nodes.py2
LOWtesting/test_unittest.py2
LOWtesting/test_scope.py1
LOWtesting/test_setupplan.py1
LOWtesting/typing_checks.py8
LOWtesting/test_collection.py2
LOWtesting/test_terminal.py4
LOWtesting/test_threadexception.py1
LOWtesting/typing_raises_group.py1
LOWtesting/test_error_diffs.py8
LOWtesting/test_reports.py2
LOWtesting/test_pluginmanager.py2
LOWtesting/test_runner.py2
LOWtesting/test_monkeypatch.py2
LOWtesting/test_monkeypatch.py501
LOWtesting/test_doctest.py2
LOWtesting/test_compat.py2
LOWtesting/test_config.py2
LOWtesting/test_capture.py2
LOWtesting/test_parseopt.py2
LOWtesting/test_link_resolve.py2
LOWtesting/test_entry_points.py2
LOWtesting/test_helpconfig.py2
LOWtesting/test_debugging.py2
LOWtesting/test_cacheprovider.py1
LOWtesting/test_meta.py7
LOWtesting/test_unraisableexception.py1
LOWtesting/test_findpaths.py2
LOWtesting/test_assertion.py2
LOWtesting/test_warning_types.py2
LOWtesting/test_pytester.py2
LOWtesting/test_argcomplete.py2
LOWtesting/test_mark_expression.py1
LOWtesting/test_main.py2
LOWtesting/test_tmpdir.py2
288 more matches not shown…
Cross-File Repetition39 hits · 195 pts
SeverityFileLineSnippet
HIGHtesting/test_assertrewrite.py0def test_rewritten(): assert "@py_builtins" in globals()
HIGHtesting/test_assertrewrite.py0def test_rewritten(): assert "@py_builtins" in globals()
HIGHtesting/test_assertrewrite.py0def test_rewritten(): assert "@py_builtins" in globals()
HIGHtesting/test_assertrewrite.py0def test_rewritten(): assert "@py_builtins" in globals()
HIGHtesting/test_assertrewrite.py0def test_rewritten(): assert "@py_builtins" in globals()
HIGHtesting/test_assertion.py0def test_rewritten(): assert "@py_builtins" in globals()
HIGHtesting/test_terminal.py0def test_one(): pass def test_two(): pass def test_three(): pass
HIGHtesting/test_terminal.py0def test_one(): pass def test_two(): pass def test_three(): pass
HIGHtesting/test_terminal.py0def test_one(): pass def test_two(): pass def test_three(): pass
HIGHtesting/test_terminal.py0def test_failure(): import warnings warnings.warn("warning_from_" + "test") assert 0
HIGHtesting/test_terminal.py0def test_failure(): import warnings warnings.warn("warning_from_" + "test") assert 0
HIGHtesting/test_terminal.py0def test_failure(): import warnings warnings.warn("warning_from_" + "test") assert 0
HIGHtesting/test_reports.py0this test came originally from test_remote.py in xdist (ca03269).
HIGHtesting/test_reports.py0this test came originally from test_remote.py in xdist (ca03269).
HIGHtesting/test_reports.py0this test came originally from test_remote.py in xdist (ca03269).
HIGHtesting/test_config.py0def pytest_addoption(parser): parser.addini("new_name", "my option", aliases=["old_name"])
HIGHtesting/test_config.py0def pytest_addoption(parser): parser.addini("new_name", "my option", aliases=["old_name"])
HIGHtesting/test_config.py0def pytest_addoption(parser): parser.addini("new_name", "my option", aliases=["old_name"])
HIGHtesting/test_config.py0def pytest_addoption(parser): parser.addini("new_name", "my option", aliases=["old_name"])
HIGHtesting/test_tmpdir.py0[tool.pytest.ini_options] tmp_path_retention_policy = "failed"
HIGHtesting/test_tmpdir.py0[tool.pytest.ini_options] tmp_path_retention_policy = "failed"
HIGHtesting/test_tmpdir.py0[tool.pytest.ini_options] tmp_path_retention_policy = "failed"
HIGHtesting/test_stepwise.py0def test_1(): pass def test_2(): assert false def test_3(): pass
HIGHtesting/test_stepwise.py0def test_1(): pass def test_2(): assert false def test_3(): pass
HIGHtesting/test_stepwise.py0def test_1(): pass def test_2(): assert false def test_3(): pass
HIGHtesting/python/fixtures.py0import pytest @pytest.fixture def db(): pass @pytest.fixture def app(db): pass
HIGHtesting/python/fixtures.py0import pytest @pytest.fixture def db(): pass @pytest.fixture def app(db): pass
HIGHtesting/python/fixtures.py0import pytest @pytest.fixture def db(): pass @pytest.fixture def app(db): pass
HIGHtesting/code/test_excinfo.py0def func1(): raise valueerror("hello") def entry(): func1()
HIGHtesting/code/test_excinfo.py0def func1(): raise valueerror("hello") def entry(): func1()
HIGHtesting/code/test_excinfo.py0def func1(): raise valueerror("hello") def entry(): func1()
HIGHtesting/logging/test_reporting.py0import pytest import logging def test_log_file(request): plugin = request.config.pluginmanager.getplugin('logging-plugin
HIGHtesting/logging/test_reporting.py0import pytest import logging def test_log_file(request): plugin = request.config.pluginmanager.getplugin('logging-plugin
HIGHtesting/logging/test_reporting.py0import pytest import logging def test_log_file(request): plugin = request.config.pluginmanager.getplugin('logging-plugin
HIGHtesting/logging/test_reporting.py0import pytest import logging def test_log_file(request): plugin = request.config.pluginmanager.getplugin('logging-plugin
HIGHtesting/logging/test_reporting.py0import logging logger = logging.getlogger(__name__) def test_foo(): logger.warning('text') assert false
HIGHtesting/logging/test_reporting.py0import logging logger = logging.getlogger(__name__) def test_foo(): logger.warning('text') assert false
HIGHtesting/logging/test_reporting.py0import logging logger = logging.getlogger(__name__) def test_foo(): logger.warning('text') assert false
HIGHtesting/logging/test_reporting.py0import logging logger = logging.getlogger(__name__) def test_foo(): logger.warning('text') assert false
Deep Nesting93 hits · 86 pts
SeverityFileLineSnippet
LOWtesting/conftest.py51
LOWtesting/test_recwarn.py119
LOWtesting/test_recwarn.py226
LOWtesting/test_recwarn.py412
LOWtesting/python/raises.py243
LOWscripts/generate-gh-release-notes.py22
LOWscripts/update-plugin-list.py134
LOWsrc/_pytest/skipping.py277
LOWsrc/_pytest/logging.py940
LOWsrc/_pytest/unittest.py614
LOWsrc/_pytest/unittest.py424
LOWsrc/_pytest/helpconfig.py180
LOWsrc/_pytest/terminal.py308
LOWsrc/_pytest/terminal.py625
LOWsrc/_pytest/terminal.py927
LOWsrc/_pytest/terminal.py1148
LOWsrc/_pytest/terminal.py1198
LOWsrc/_pytest/warnings.py22
LOWsrc/_pytest/subtests.py367
LOWsrc/_pytest/recwarn.py298
LOWsrc/_pytest/debugging.py240
LOWsrc/_pytest/python_api.py646
LOWsrc/_pytest/python_api.py908
LOWsrc/_pytest/python_api.py241
LOWsrc/_pytest/python_api.py330
LOWsrc/_pytest/unraisableexception.py47
LOWsrc/_pytest/capture.py712
LOWsrc/_pytest/pytester.py285
LOWsrc/_pytest/pytester.py1679
LOWsrc/_pytest/junitxml.py529
LOWsrc/_pytest/python.py220
LOWsrc/_pytest/python.py311
LOWsrc/_pytest/python.py400
LOWsrc/_pytest/python.py695
LOWsrc/_pytest/python.py899
LOWsrc/_pytest/python.py974
LOWsrc/_pytest/python.py1037
LOWsrc/_pytest/python.py1230
LOWsrc/_pytest/python.py1491
LOWsrc/_pytest/python.py1711
LOWsrc/_pytest/reports.py384
LOWsrc/_pytest/setuponly.py32
LOWsrc/_pytest/raises.py1255
LOWsrc/_pytest/raises.py1432
LOWsrc/_pytest/threadexception.py38
LOWsrc/_pytest/main.py317
LOWsrc/_pytest/main.py564
LOWsrc/_pytest/main.py789
LOWsrc/_pytest/main.py899
LOWsrc/_pytest/monkeypatch.py337
LOWsrc/_pytest/pathlib.py792
LOWsrc/_pytest/pathlib.py941
LOWsrc/_pytest/fixtures.py131
LOWsrc/_pytest/fixtures.py193
LOWsrc/_pytest/fixtures.py223
LOWsrc/_pytest/fixtures.py244
LOWsrc/_pytest/fixtures.py1571
LOWsrc/_pytest/fixtures.py879
LOWsrc/_pytest/fixtures.py1991
LOWsrc/_pytest/cacheprovider.py249
33 more matches not shown…
Decorative Section Separators22 hits · 72 pts
SeverityFileLineSnippet
MEDIUMsrc/_pytest/hookspec.py476# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py478# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py929# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py931# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py1161# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py1163# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py48# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py50# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py155# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py158# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py221# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py223# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py588# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py590# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py828# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py830# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py883# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py885# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py1000# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py1002# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py1190# -------------------------------------------------------------------------
MEDIUMsrc/_pytest/hookspec.py1192# -------------------------------------------------------------------------
Excessive Try-Catch Wrapping48 hits · 49 pts
SeverityFileLineSnippet
MEDIUMtesting/test_unittest.py715def __call__(self, result=None):
LOWtesting/test_unittest.py720 except Exception:
LOWtesting/test_unittest.py729 except Exception:
LOWtesting/test_runner.py642 except Exception as e:
LOWtesting/test_config.py2688 except Exception as exc:
MEDIUMtesting/code/test_excinfo.py150def xyz():
LOWtesting/code/test_excinfo.py1512 except Exception:
LOWtesting/code/test_excinfo.py1564 except Exception as e:
LOWtesting/code/test_excinfo.py1412 except Exception as e:
LOWtesting/code/test_excinfo.py1984 except Exception:
LOWtesting/logging/test_fixture.py261 except Exception:
LOWsrc/_pytest/skipping.py128 except Exception as exc:
LOWsrc/_pytest/skipping.py140 except Exception as exc:
LOWsrc/_pytest/unittest.py68 except Exception:
LOWsrc/_pytest/unittest.py161 except Exception:
LOWsrc/_pytest/runner.py185 except Exception as e:
LOWsrc/_pytest/compat.py257 except Exception:
MEDIUMsrc/_pytest/compat.py229def getimfunc(func):
LOWsrc/_pytest/debugging.py133 except Exception as exc:
LOWsrc/_pytest/python_api.py211 except Exception as e:
LOWsrc/_pytest/pytester.py1192 except Exception:
LOWsrc/_pytest/python.py1018 except Exception as e:
LOWsrc/_pytest/doctest.py484 except Exception as e:
LOWsrc/_pytest/pathlib.py220 except Exception:
LOWsrc/_pytest/pathlib.py233 except Exception:
LOWsrc/_pytest/pathlib.py321 except Exception:
LOWsrc/_pytest/pathlib.py406 except Exception as exc:
LOWsrc/_pytest/fixtures.py1004 except Exception as e:
MEDIUMsrc/_pytest/config/__init__.py2070def _assertion_supported() -> bool:
LOWsrc/_pytest/config/__init__.py511 except Exception:
LOWsrc/_pytest/config/__init__.py764 except Exception as e:
LOWsrc/_pytest/config/__init__.py2173 except Exception:
LOWsrc/_pytest/_code/code.py329 except Exception:
LOWsrc/_pytest/_code/code.py1156 except Exception as e:
LOWsrc/_pytest/_code/source.py128 except Exception:
LOWsrc/_pytest/_code/source.py217 except Exception:
MEDIUMsrc/_pytest/_code/source.py125def findsource(obj) -> tuple[Source | None, int]:
LOWsrc/_pytest/assertion/util.py188 except Exception:
LOWsrc/_pytest/assertion/_guards.py40 except Exception:
LOWsrc/_pytest/assertion/rewrite.py394 except Exception as e:
LOWsrc/_pytest/assertion/rewrite.py475 except Exception:
LOWsrc/_pytest/assertion/rewrite.py493 except Exception:
LOWsrc/_pytest/_io/saferepr.py116 except Exception as exc:
LOWsrc/_pytest/_io/saferepr.py154 except Exception as exc:
LOWsrc/_pytest/_py/path.py975 except Exception:
LOWsrc/_pytest/_py/path.py1404 except Exception: # this might be error.Error, WindowsError ...
LOWsrc/_pytest/_py/path.py1411 except Exception: # this might be error.Error, WindowsError ...
MEDIUMsrc/_pytest/_py/path.py110def _stat(self) -> Stat:
Self-Referential Comments15 hits · 48 pts
SeverityFileLineSnippet
MEDIUMtesting/test_conftest.py381 # Create a build directory that contains symlinks to actual files
MEDIUMtesting/test_nodes.py111 # Create a path and verify it's normalized
MEDIUMtesting/test_collection.py1537 # Create a broken symlink.
MEDIUMtesting/test_link_resolve.py17 for c in ascii_lowercase[7:]: # Create a subst drive from H-Z.
MEDIUMtesting/test_stepwise.py28 # Create a simple test suite.
MEDIUMtesting/test_pathlib.py582 # Create a mock entry that will raise an OSError when is_file is called
MEDIUMtesting/test_pathlib.py756 # Create a directory structure first without __init__.py files.
MEDIUMtesting/test_pathlib.py764 # Create the __init__.py files, it should now resolve to a proper module name.
MEDIUMtesting/test_pathlib.py1014 # Create the tests files, outside 'src' and the virtualenv.
MEDIUMsrc/_pytest/python.py1406 # Create the new calls: if we are parametrize() multiple times (by applying the decorator
MEDIUMsrc/_pytest/python.py1752 """This class is a stop gap solution until we evolve to have actual function
MEDIUMsrc/_pytest/pathlib.py49# The following function, variables and comments were
MEDIUMsrc/_pytest/cacheprovider.py51# This file is a cache directory tag created by pytest.
MEDIUMsrc/_pytest/_code/code.py1249# This class is abstract -- only subclasses are instantiated.
MEDIUMsrc/_pytest/assertion/rewrite.py967 # This method handles the 'walrus operator' repr of the target
Overly Generic Function Names31 hits · 16 pts
SeverityFileLineSnippet
LOWtesting/test_mark.py728 def test_function():
LOWtesting/test_recwarn.py276 def test_function(self) -> None:
LOWtesting/test_collection.py2267 def test_function(): pass
LOWtesting/test_collection.py2319 def test_function(): pass
LOWtesting/test_junitxml.py362 def test_function(arg):
LOWtesting/test_junitxml.py388 def test_function(arg):
LOWtesting/test_junitxml.py414 def test_function(arg):
LOWtesting/test_junitxml.py555 pytester.makepyfile("def test_function(): pass")
LOWtesting/test_junitxml.py924 def test_function(arg):
LOWtesting/test_junitxml.py954 def test_function(arg):
LOWtesting/test_junitxml.py985 def test_function(arg):
LOWtesting/python/collect.py396 def test_function(arg):
LOWtesting/python/collect.py408 def test_function(arg):
LOWtesting/python/collect.py423 def test_function(arg):
LOWtesting/python/collect.py609 def test_function(arg):
LOWtesting/python/collect.py639 def test_function(arg):
LOWtesting/python/metafunc.py1572 def test_function():
LOWtesting/python/metafunc.py419 def test_function():
LOWtesting/python/metafunc.py1395 def test_function(a, b):
LOWtesting/python/metafunc.py1413 def test_function(a, b):
LOWtesting/python/metafunc.py1181 def test_function(metafunc, pytestconfig):
LOWtesting/python/metafunc.py1433 def test_function(a, b):
LOWtesting/python/metafunc.py1508 def test_function(a, b):
LOWtesting/python/fixtures.py1169 def test_function(request, farg):
LOWtesting/python/fixtures.py1329 def test_function(keywords):
LOWtesting/code/test_excinfo.py263 def do_stuff() -> None:
LOWdoc/en/example/pythoncollection.py6def test_function():
LOWsrc/_pytest/junitxml.py286 def test_function(record_property):
LOWsrc/_pytest/mark/structures.py334 def test_function():
LOWsrc/_pytest/mark/structures.py590 def test_function():
LOWsrc/_pytest/assertion/rewrite.py783 def helper(self, name: str, *args: ast.expr) -> ast.expr:
Over-Commented Block14 hits · 12 pts
SeverityFileLineSnippet
LOWtox.ini21 # checks that 3.11 native ExceptionGroup works with exceptiongroup
LOWtesting/test_config.py1681
LOWtesting/test_unraisableexception.py401
LOWtesting/acceptance_test.py761 # │ ├── __init__.py
LOWtesting/acceptance_test.py841 )
LOWdoc/en/broken-dep-constraints.txt1# This file contains transitive dependencies that need to be pinned for some reason.
LOWsrc/_pytest/deprecated.py101# ...
LOWsrc/_pytest/tmpdir.py161 from_env = os.environ.get("PYTEST_DEBUG_TEMPROOT")
LOWsrc/_pytest/python_api.py461 # If either type is non-numeric, fall back to strict equality.
LOWsrc/_pytest/python_api.py861 of raising ``TypeError``.
LOWsrc/_pytest/fixtures.py421 *,
LOWsrc/_pytest/fixtures.py1041 # Emit deprecation warning if baseid string is used when node could be provided.
LOWsrc/_pytest/assertion/truncate.py61 will be replaced by a usage message.
LOWsrc/_pytest/_io/pprint.py1# mypy: allow-untyped-defs
AI Slop Vocabulary6 hits · 11 pts
SeverityFileLineSnippet
MEDIUMtesting/test_cacheprovider.py327 # Run this again to make sure clear-cache is robust
MEDIUMsrc/_pytest/helpconfig.py22 """An argparse Action that will raise a PrintHelp exception in order to skip
LOWsrc/_pytest/debugging.py319 # we can't just return `partial(pdb.runcall, testfunction)` because (on
LOWsrc/_pytest/python_api.py515 # just return the absolute tolerance.
MEDIUMsrc/_pytest/capture.py481 # target FD). The following approach is robust, I believe.
MEDIUMsrc/_pytest/fixtures.py1046 # Used for node-based matching which is more robust than string matching.
Redundant / Tautological Comments8 hits · 10 pts
SeverityFileLineSnippet
LOWtesting/test_tmpdir.py250 # Check if the whole directory is removed
LOWtesting/test_tmpdir.py280 # Check if the whole directory is kept
LOWtesting/test_junitxml.py1094 # Check if the null byte gets replaced
LOWsrc/_pytest/unittest.py472 # Check if we have non-subtest skips: if there are also sub failures, non-subtest skips are not treated in
LOWsrc/_pytest/python_api.py442 # Check if `val` is a native bool or numpy bool.
LOWsrc/_pytest/main.py735 # Check if we have the common case of running
LOWsrc/_pytest/fixtures.py1240 # Check if fixture is an instance method (bound to instance, not class)
LOWsrc/_pytest/assertion/rewrite.py1005 # Check if the left operand is an ast.NamedExpr and the value has already been visited
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippet
HIGHsrc/_pytest/runner.py214 value = value.replace("\x00", "(null)")
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippet
HIGHsrc/_pytest/pytester.py797Create new text file(s) in the test directory. :param ext: The extension the file(s) should use, in
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippet
LOWsrc/_pytest/unittest.py556 # We need to check if "twisted.trial.unittest" is specifically present in sys.modules.
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippet
LOWsrc/_pytest/fixtures.py1171 # We make sure to do this after checking for cached value to avoid
Fake / Example Data2 hits · 1 pts
SeverityFileLineSnippet
LOWtesting/test_assertion.py2304 long_text = "Lorem ipsum dolor sit amet " * 10
LOWtesting/test_assertion.py2304 long_text = "Lorem ipsum dolor sit amet " * 10