Repository Analysis

pytest-dev/pytest

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

18.8 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pytest-dev/pytest, a Python project with 14,346 GitHub stars. SynthScan v2.0 examined 110,960 lines of code across 281 source files, recording 2690 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 18.8 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

18.8
Adjusted Score
18.8
Raw Score
100%
Time Factor
2026-07-14
Last Push
14.3K
Stars
Python
Language
111.0K
Lines of Code
281
Files
2.7K
Pattern Hits
2026-07-14
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 2MEDIUM 46LOW 2642

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 2690 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers2069 hits · 1438 pts
SeverityFileLineSnippetContext
LOWtesting/test_legacypath.py30def test_testdir_makefile_dot_prefixes_extension_silently(CODE
LOWtesting/test_legacypath.py38def test_testdir_makefile_ext_none_raises_type_error(testdir: Testdir) -> None:CODE
LOWtesting/test_legacypath.py44def test_testdir_makefile_ext_empty_string_makes_file(testdir: Testdir) -> None:CODE
LOWtesting/test_legacypath.py68def test_tmpdir_equals_tmp_path(tmpdir: LEGACY_PATH, tmp_path: Path) -> None:CODE
LOWtesting/test_legacypath.py72def test_tmpdir_always_is_realpath(pytester: pytest.Pytester) -> None:CODE
LOWtesting/test_legacypath.py94def test_fixturerequest_getmodulepath(pytester: pytest.Pytester) -> None:CODE
LOWtesting/test_legacypath.py108 def test_session_scoped_unavailable_attributes(self, session_request):CODE
LOWtesting/test_legacypath.py172def test_inifile_from_cmdline_main_hook(pytester: pytest.Pytester) -> None:STRING
LOWtesting/test_setuponly.py16def test_show_only_active_fixtures(CODE
LOWtesting/test_setuponly.py42def test_show_different_scopes(pytester: Pytester, mode) -> None:CODE
LOWtesting/test_setuponly.py71def test_show_nested_fixtures(pytester: Pytester, mode) -> None:CODE
LOWtesting/test_setuponly.py105def test_show_fixtures_with_autouse(pytester: Pytester, mode) -> None:CODE
LOWtesting/test_setuponly.py132def test_show_fixtures_with_parameters(pytester: Pytester, mode) -> None:CODE
LOWtesting/test_setuponly.py165def test_show_fixtures_with_parameter_ids(pytester: Pytester, mode) -> None:CODE
LOWtesting/test_setuponly.py194def test_show_fixtures_with_parameter_ids_function(pytester: Pytester, mode) -> None:CODE
LOWtesting/test_setuponly.py214def test_dynamic_fixture_request(pytester: Pytester) -> None:CODE
LOWtesting/test_setuponly.py219 def dynamically_requested_fixture():STRING
LOWtesting/test_setuponly.py262def test_show_fixtures_and_execute_test(pytester: Pytester) -> None:CODE
LOWtesting/test_setuponly.py307def test_show_fixture_action_with_bytes(pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1577 def test_assertion_walrus_operator_dont_rewrite(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1596 def test_assertion_inline_walrus_operator(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1611 def test_assertion_inline_walrus_operator_reverse(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1626 def test_assertion_walrus_no_variable_name_conflict(CODE
LOWtesting/test_assertrewrite.py1640 def test_assertion_walrus_operator_true_assertion_and_changes_variable_value(CODE
LOWtesting/test_assertrewrite.py1654 def test_assertion_walrus_operator_fail_assertion(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1666 def test_assertion_walrus_operator_boolean_composite(CODE
LOWtesting/test_assertrewrite.py1680 def test_assertion_walrus_operator_compare_boolean_fails(CODE
LOWtesting/test_assertrewrite.py1694 def test_assertion_walrus_operator_boolean_none_fails(CODE
LOWtesting/test_assertrewrite.py1708 def test_assertion_walrus_operator_value_changes_cleared_after_each_test(CODE
LOWtesting/test_assertrewrite.py1725 def test_assertion_namedexpr_compare_left_overwrite(CODE
LOWtesting/test_assertrewrite.py1767 def test_assertion_walrus_operator_equals_operand_function(CODE
LOWtesting/test_assertrewrite.py1782 def test_assertion_walrus_operator_equals_operand_function_keyword_arg(CODE
LOWtesting/test_assertrewrite.py1797 def test_assertion_walrus_operator_equals_operand_function_arg_as_function(CODE
LOWtesting/test_assertrewrite.py1812 def test_assertion_walrus_operator_gt_operand_function(CODE
LOWtesting/test_assertrewrite.py77 def test_place_initial_imports(self) -> None:CODE
LOWtesting/test_assertrewrite.py142 def test_positions_are_preserved(self) -> None:CODE
LOWtesting/test_assertrewrite.py359 def test_rewrites_plugin_as_a_package(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py428 def test_assertrepr_compare_same_width(self, request) -> None:CODE
LOWtesting/test_assertrewrite.py448 def test_dont_rewrite_if_hasattr_fails(self, request) -> None:CODE
LOWtesting/test_assertrewrite.py474 def test_assert_already_has_message(self) -> None:CODE
LOWtesting/test_assertrewrite.py493 def test_assertion_message_multiline(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py506 def test_assertion_message_tuple(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py517 def test_assertion_message_expr(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py528 def test_assertion_message_escape(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py541 def test_assertion_messages_bytes(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py547 def test_assertion_message_verbosity(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py654 def test_short_circuit_evaluation(self) -> None:CODE
LOWtesting/test_assertrewrite.py729 def test_starred_with_side_effect(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py898 def test_assert_raising__bool__in_comparison(self) -> None:CODE
LOWtesting/test_assertrewrite.py919 def test_assert_handling_raise_in__iter__(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py962 def test_custom_repr_non_ascii(self) -> None:CODE
LOWtesting/test_assertrewrite.py1038 def test_load_resource_via_files_with_rewrite(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1186 def test_package_without__init__py(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1203 def test_rewrite_warning_ignore(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1219 def test_rewrite_module_imported_from_conftest(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1253 def test_rewrite_warning_using_pytest_plugins(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1268 def test_rewrite_warning_using_pytest_plugins_env_var(CODE
LOWtesting/test_assertrewrite.py1313 def test_resources_provider_for_loader(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1537 def test_rewrite_python_files_contain_subdirs(self, pytester: Pytester) -> None:CODE
LOWtesting/test_assertrewrite.py1559 def test_assertion_walrus_operator(self, pytester: Pytester) -> None:CODE
2009 more matches not shown…
Unused Imports350 hits · 302 pts
SeverityFileLineSnippetContext
LOWbench/bench_argcomplete.py5CODE
LOWbench/unit_test.py1CODE
LOWbench/unit_test.py3CODE
LOWbench/skip.py1CODE
LOWbench/manyparam.py1CODE
LOWbench/empty.py1CODE
LOWbench/bench.py1CODE
LOWbench/bench.py10CODE
LOWbench/xunit.py1CODE
LOWtesting/test_legacypath.py2CODE
LOWtesting/test_setuponly.py2CODE
LOWtesting/test_assertrewrite.py2CODE
LOWtesting/test_subtests.py1CODE
LOWtesting/conftest.py2CODE
LOWtesting/test_collect_imported_tests.py3CODE
LOWtesting/test_warnings.py2CODE
LOWtesting/test_warnings.py843CODE
LOWtesting/test_mark.py2CODE
LOWtesting/test_faulthandler.py2CODE
LOWtesting/test_recwarn.py2CODE
LOWtesting/test_session.py2CODE
LOWtesting/test_skipping.py2CODE
LOWtesting/test_python_path.py2CODE
LOWtesting/test_pastebin.py2CODE
LOWtesting/test_conftest.py2CODE
LOWtesting/test_nodes.py2CODE
LOWtesting/test_unittest.py2CODE
LOWtesting/test_scope.py1CODE
LOWtesting/test_setupplan.py1CODE
LOWtesting/typing_checks.py8CODE
LOWtesting/test_collection.py2CODE
LOWtesting/test_terminal.py4CODE
LOWtesting/test_threadexception.py1CODE
LOWtesting/typing_raises_group.py1CODE
LOWtesting/test_error_diffs.py8CODE
LOWtesting/test_reports.py2CODE
LOWtesting/test_pluginmanager.py2CODE
LOWtesting/test_runner.py2CODE
LOWtesting/test_monkeypatch.py2CODE
LOWtesting/test_monkeypatch.py501CODE
LOWtesting/test_doctest.py2CODE
LOWtesting/test_compat.py2CODE
LOWtesting/test_config.py2CODE
LOWtesting/test_capture.py2CODE
LOWtesting/test_parseopt.py2CODE
LOWtesting/test_link_resolve.py2CODE
LOWtesting/test_entry_points.py2CODE
LOWtesting/test_helpconfig.py2CODE
LOWtesting/test_debugging.py2CODE
LOWtesting/test_cacheprovider.py1CODE
LOWtesting/test_meta.py7CODE
LOWtesting/test_unraisableexception.py1CODE
LOWtesting/test_findpaths.py2CODE
LOWtesting/test_assertion.py2CODE
LOWtesting/test_warning_types.py2CODE
LOWtesting/test_pytester.py2CODE
LOWtesting/test_argcomplete.py2CODE
LOWtesting/test_mark_expression.py1CODE
LOWtesting/test_main.py2CODE
LOWtesting/test_tmpdir.py2CODE
290 more matches not shown…
Deep Nesting91 hits · 82 pts
SeverityFileLineSnippetContext
LOWtesting/conftest.py51CODE
LOWtesting/test_recwarn.py119CODE
LOWtesting/test_recwarn.py226CODE
LOWtesting/test_recwarn.py412CODE
LOWtesting/python/raises.py243CODE
LOWscripts/generate-gh-release-notes.py22CODE
LOWscripts/update-plugin-list.py134CODE
LOWsrc/_pytest/approx.py721CODE
LOWsrc/_pytest/approx.py980CODE
LOWsrc/_pytest/approx.py272CODE
LOWsrc/_pytest/approx.py373CODE
LOWsrc/_pytest/skipping.py277CODE
LOWsrc/_pytest/logging.py940CODE
LOWsrc/_pytest/unittest.py615CODE
LOWsrc/_pytest/unittest.py425CODE
LOWsrc/_pytest/helpconfig.py180CODE
LOWsrc/_pytest/terminal.py308CODE
LOWsrc/_pytest/terminal.py625CODE
LOWsrc/_pytest/terminal.py927CODE
LOWsrc/_pytest/terminal.py1148CODE
LOWsrc/_pytest/terminal.py1198CODE
LOWsrc/_pytest/warnings.py22CODE
LOWsrc/_pytest/subtests.py367CODE
LOWsrc/_pytest/recwarn.py298CODE
LOWsrc/_pytest/debugging.py240CODE
LOWsrc/_pytest/unraisableexception.py47CODE
LOWsrc/_pytest/capture.py712CODE
LOWsrc/_pytest/pytester.py285CODE
LOWsrc/_pytest/pytester.py1679CODE
LOWsrc/_pytest/junitxml.py529CODE
LOWsrc/_pytest/python.py220CODE
LOWsrc/_pytest/python.py311CODE
LOWsrc/_pytest/python.py400CODE
LOWsrc/_pytest/python.py695CODE
LOWsrc/_pytest/python.py899CODE
LOWsrc/_pytest/python.py974CODE
LOWsrc/_pytest/python.py1037CODE
LOWsrc/_pytest/python.py1231CODE
LOWsrc/_pytest/python.py1492CODE
LOWsrc/_pytest/python.py1714CODE
LOWsrc/_pytest/reports.py384CODE
LOWsrc/_pytest/setuponly.py32CODE
LOWsrc/_pytest/raises.py1255CODE
LOWsrc/_pytest/raises.py1432CODE
LOWsrc/_pytest/threadexception.py38CODE
LOWsrc/_pytest/main.py317CODE
LOWsrc/_pytest/main.py564CODE
LOWsrc/_pytest/main.py789CODE
LOWsrc/_pytest/main.py899CODE
LOWsrc/_pytest/monkeypatch.py337CODE
LOWsrc/_pytest/pathlib.py792CODE
LOWsrc/_pytest/pathlib.py941CODE
LOWsrc/_pytest/fixtures.py121CODE
LOWsrc/_pytest/fixtures.py163CODE
LOWsrc/_pytest/fixtures.py225CODE
LOWsrc/_pytest/fixtures.py255CODE
LOWsrc/_pytest/fixtures.py276CODE
LOWsrc/_pytest/fixtures.py1614CODE
LOWsrc/_pytest/fixtures.py911CODE
LOWsrc/_pytest/cacheprovider.py249CODE
31 more matches not shown…
Decorative Section Separators22 hits · 72 pts
SeverityFileLineSnippetContext
MEDIUMsrc/_pytest/hookspec.py476# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py478# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py929# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py931# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py1161# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py1163# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py48# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py50# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py155# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py158# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py221# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py223# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py588# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py590# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py828# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py830# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py883# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py885# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py1000# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py1002# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py1190# -------------------------------------------------------------------------COMMENT
MEDIUMsrc/_pytest/hookspec.py1192# -------------------------------------------------------------------------COMMENT
Excessive Try-Catch Wrapping48 hits · 49 pts
SeverityFileLineSnippetContext
MEDIUMtesting/test_unittest.py715def __call__(self, result=None):CODE
LOWtesting/test_unittest.py720 except Exception:CODE
LOWtesting/test_unittest.py729 except Exception:CODE
LOWtesting/test_runner.py642 except Exception as e:CODE
LOWtesting/test_config.py2710 except Exception as exc:CODE
MEDIUMtesting/code/test_excinfo.py150def xyz():CODE
LOWtesting/code/test_excinfo.py1512 except Exception:CODE
LOWtesting/code/test_excinfo.py1564 except Exception as e:CODE
LOWtesting/code/test_excinfo.py1412 except Exception as e:STRING
LOWtesting/code/test_excinfo.py1984 except Exception:STRING
LOWtesting/logging/test_fixture.py261 except Exception:CODE
LOWsrc/_pytest/approx.py226 except Exception as e:CODE
LOWsrc/_pytest/skipping.py128 except Exception as exc:CODE
LOWsrc/_pytest/skipping.py140 except Exception as exc:CODE
LOWsrc/_pytest/unittest.py69 except Exception:CODE
LOWsrc/_pytest/unittest.py162 except Exception:CODE
LOWsrc/_pytest/runner.py185 except Exception as e:CODE
LOWsrc/_pytest/compat.py257 except Exception:CODE
MEDIUMsrc/_pytest/compat.py229def getimfunc(func):CODE
LOWsrc/_pytest/debugging.py133 except Exception as exc:CODE
LOWsrc/_pytest/pytester.py1192 except Exception:CODE
LOWsrc/_pytest/python.py1018 except Exception as e:CODE
LOWsrc/_pytest/doctest.py484 except Exception as e:CODE
LOWsrc/_pytest/pathlib.py220 except Exception:CODE
LOWsrc/_pytest/pathlib.py233 except Exception:CODE
LOWsrc/_pytest/pathlib.py321 except Exception:CODE
LOWsrc/_pytest/pathlib.py406 except Exception as exc:CODE
LOWsrc/_pytest/fixtures.py1036 except Exception as e:CODE
MEDIUMsrc/_pytest/config/__init__.py2070def _assertion_supported() -> bool:CODE
LOWsrc/_pytest/config/__init__.py511 except Exception:CODE
LOWsrc/_pytest/config/__init__.py764 except Exception as e:CODE
LOWsrc/_pytest/config/__init__.py2173 except Exception:STRING
LOWsrc/_pytest/_code/code.py331 except Exception:CODE
LOWsrc/_pytest/_code/code.py1172 except Exception as e:CODE
LOWsrc/_pytest/_code/source.py128 except Exception:CODE
LOWsrc/_pytest/_code/source.py217 except Exception:CODE
MEDIUMsrc/_pytest/_code/source.py125def findsource(obj) -> tuple[Source | None, int]:CODE
LOWsrc/_pytest/assertion/util.py206 except Exception:STRING
LOWsrc/_pytest/assertion/_guards.py41 except Exception:CODE
LOWsrc/_pytest/assertion/rewrite.py394 except Exception as e:CODE
LOWsrc/_pytest/assertion/rewrite.py475 except Exception:STRING
LOWsrc/_pytest/assertion/rewrite.py493 except Exception:STRING
LOWsrc/_pytest/_io/saferepr.py116 except Exception as exc:CODE
LOWsrc/_pytest/_io/saferepr.py154 except Exception as exc:CODE
LOWsrc/_pytest/_py/path.py975 except Exception:CODE
LOWsrc/_pytest/_py/path.py1404 except Exception: # this might be error.Error, WindowsError ...CODE
LOWsrc/_pytest/_py/path.py1411 except Exception: # this might be error.Error, WindowsError ...CODE
MEDIUMsrc/_pytest/_py/path.py110def _stat(self) -> Stat:CODE
Self-Referential Comments14 hits · 44 pts
SeverityFileLineSnippetContext
MEDIUMtesting/test_conftest.py381 # Create a build directory that contains symlinks to actual filesCOMMENT
MEDIUMtesting/test_nodes.py111 # Create a path and verify it's normalizedCOMMENT
MEDIUMtesting/test_collection.py1537 # Create a broken symlink.COMMENT
MEDIUMtesting/test_link_resolve.py17 for c in ascii_lowercase[7:]: # Create a subst drive from H-Z.CODE
MEDIUMtesting/test_stepwise.py28 # Create a simple test suite.COMMENT
MEDIUMtesting/test_pathlib.py582 # Create a mock entry that will raise an OSError when is_file is calledCOMMENT
MEDIUMtesting/test_pathlib.py756 # Create a directory structure first without __init__.py files.COMMENT
MEDIUMtesting/test_pathlib.py764 # Create the __init__.py files, it should now resolve to a proper module name.COMMENT
MEDIUMtesting/test_pathlib.py1014 # Create the tests files, outside 'src' and the virtualenv.COMMENT
MEDIUMsrc/_pytest/python.py1407 # Create the new calls: if we are parametrize() multiple times (by applying the decoratorCOMMENT
MEDIUMsrc/_pytest/python.py1755 """This class is a stop gap solution until we evolve to have actual functionSTRING
MEDIUMsrc/_pytest/pathlib.py49# The following function, variables and comments wereCOMMENT
MEDIUMsrc/_pytest/cacheprovider.py51# This file is a cache directory tag created by pytest.COMMENT
MEDIUMsrc/_pytest/assertion/rewrite.py967 # This method handles the 'walrus operator' repr of the targetCOMMENT
Modern Structural Boilerplate22 hits · 22 pts
SeverityFileLineSnippetContext
LOWtesting/conftest.py31def set_column_width(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtesting/logging/test_fixture.py13logger = logging.getLogger(__name__)CODE
LOWsrc/py.py15__all__ = ["error", "path"]CODE
LOWsrc/pytest/__init__.py100__all__ = [CODE
LOWsrc/_pytest/logging.py544 def set_level(self, level: int | str, logger: str | None = None) -> None:CODE
LOWsrc/_pytest/logging.py752 def set_log_path(self, fname: str) -> None:CODE
LOWsrc/_pytest/logging.py933 def set_when(self, when: str | None) -> None:CODE
LOWsrc/_pytest/logging.py970 def set_when(self, when: str) -> None:CODE
LOWsrc/_pytest/terminal.py1416 def _set_main_color(self) -> None:CODE
LOWsrc/_pytest/__init__.py4__all__ = ["__version__", "version_tuple"]CODE
LOWsrc/_pytest/stash.py9__all__ = ["Stash", "StashKey"]CODE
LOWsrc/_pytest/debugging.py279 def set_trace(cls, *args, **kwargs) -> None:CODE
LOWsrc/_pytest/capture.py807 def set_fixture(self, capture_fixture: CaptureFixture[Any]) -> None:CODE
LOWsrc/_pytest/timing.py97__all__ = ["perf_counter", "sleep", "time"]CODE
LOWsrc/_pytest/stepwise.py95 def update_date_to_now(self) -> None:CODE
LOWsrc/_pytest/junitxml.py624 def update_testcase_duration(self, report: TestReport) -> None:CODE
LOWsrc/_pytest/raises.py1468 def set_result(self, expected: int, actual: int, result: str | None) -> None:CODE
LOWsrc/_pytest/mark/__init__.py35__all__ = [CODE
LOWsrc/_pytest/mark/expression.py42__all__ = [STRING
LOWsrc/_pytest/_code/__init__.py16__all__ = [CODE
LOWsrc/_pytest/assertion/rewrite.py95 def set_session(self, session: Session | None) -> None:CODE
LOWsrc/_pytest/_io/__init__.py7__all__ = [CODE
Overly Generic Function Names31 hits · 16 pts
SeverityFileLineSnippetContext
LOWtesting/test_mark.py728 def test_function():STRING
LOWtesting/test_recwarn.py276 def test_function(self) -> None:CODE
LOWtesting/test_collection.py2267 def test_function(): passCODE
LOWtesting/test_collection.py2319 def test_function(): passCODE
LOWtesting/test_junitxml.py362 def test_function(arg):CODE
LOWtesting/test_junitxml.py388 def test_function(arg):CODE
LOWtesting/test_junitxml.py414 def test_function(arg):CODE
LOWtesting/test_junitxml.py555 pytester.makepyfile("def test_function(): pass")STRING
LOWtesting/test_junitxml.py924 def test_function(arg):STRING
LOWtesting/test_junitxml.py954 def test_function(arg):STRING
LOWtesting/test_junitxml.py985 def test_function(arg):STRING
LOWtesting/python/collect.py396 def test_function(arg):STRING
LOWtesting/python/collect.py408 def test_function(arg):STRING
LOWtesting/python/collect.py423 def test_function(arg):STRING
LOWtesting/python/collect.py609 def test_function(arg):STRING
LOWtesting/python/collect.py639 def test_function(arg):STRING
LOWtesting/python/metafunc.py1575 def test_function():CODE
LOWtesting/python/metafunc.py422 def test_function():CODE
LOWtesting/python/metafunc.py1398 def test_function(a, b):STRING
LOWtesting/python/metafunc.py1416 def test_function(a, b):STRING
LOWtesting/python/metafunc.py1184 def test_function(metafunc, pytestconfig):STRING
LOWtesting/python/metafunc.py1436 def test_function(a, b):STRING
LOWtesting/python/metafunc.py1511 def test_function(a, b):STRING
LOWtesting/python/fixtures.py1169 def test_function(request, farg):STRING
LOWtesting/python/fixtures.py1342 def test_function(keywords):STRING
LOWtesting/code/test_excinfo.py263 def do_stuff() -> None:CODE
LOWdoc/en/example/pythoncollection.py6def test_function():CODE
LOWsrc/_pytest/junitxml.py286 def test_function(record_property):STRING
LOWsrc/_pytest/mark/structures.py333 def test_function():STRING
LOWsrc/_pytest/mark/structures.py574 def test_function():STRING
LOWsrc/_pytest/assertion/rewrite.py783 def helper(self, name: str, *args: ast.expr) -> ast.expr:CODE
Over-Commented Block15 hits · 14 pts
SeverityFileLineSnippetContext
LOWpyproject.toml401 # Those are caught/handled by pyupgrade, and not easy to filter with theCOMMENT
LOWtox.ini21 # checks that 3.11 native ExceptionGroup works with exceptiongroupCOMMENT
LOWtesting/test_config.py1701 # it should load if it's enabled, or we haven't disabled autoloadingCOMMENT
LOWtesting/test_unraisableexception.py401COMMENT
LOWtesting/acceptance_test.py761 # │ ├── __init__.pyCOMMENT
LOWtesting/acceptance_test.py841 )COMMENT
LOWdoc/en/broken-dep-constraints.txt1# This file contains transitive dependencies that need to be pinned for some reason.COMMENT
LOWsrc/_pytest/approx.py941 # The primary responsibility of these classes is to implement ``__eq__()``COMMENT
LOWsrc/_pytest/deprecated.py101# ...COMMENT
LOWsrc/_pytest/tmpdir.py161 from_env = os.environ.get("PYTEST_DEBUG_TEMPROOT")COMMENT
LOWsrc/_pytest/fixtures.py461 # item (computed during collection). Dynamically requested fixturesCOMMENT
LOWsrc/_pytest/fixtures.py661 # We arrive here because of a dynamic call toCOMMENT
LOWsrc/_pytest/fixtures.py1081 # The "base" node ID for the fixture.COMMENT
LOWsrc/_pytest/assertion/truncate.py61COMMENT
LOWsrc/_pytest/_io/pprint.py1# mypy: allow-untyped-defsCOMMENT
Redundant / Tautological Comments9 hits · 12 pts
SeverityFileLineSnippetContext
LOWtesting/test_tmpdir.py250 # Check if the whole directory is removedSTRING
LOWtesting/test_tmpdir.py280 # Check if the whole directory is keptSTRING
LOWtesting/test_junitxml.py1094 # Check if the null byte gets replacedCOMMENT
LOWsrc/_pytest/approx.py998 # Check if `val` is a native bool or numpy bool.COMMENT
LOWsrc/_pytest/unittest.py473 # Check if we have non-subtest skips: if there are also sub failures, non-subtest skips are not treated inCOMMENT
LOWsrc/_pytest/main.py735 # Check if we have the common case of runningCOMMENT
LOWsrc/_pytest/fixtures.py1283 # Check if fixture is an instance method (bound to instance, not class)COMMENT
LOWsrc/_pytest/fixtures.py2000 # Insert the fixturedef into the list while maintaining a partial orderCOMMENT
LOWsrc/_pytest/assertion/rewrite.py1005 # Check if the left operand is an ast.NamedExpr and the value has already been visitedCOMMENT
AI Slop Vocabulary6 hits · 11 pts
SeverityFileLineSnippetContext
MEDIUMtesting/test_cacheprovider.py327 # Run this again to make sure clear-cache is robustSTRING
LOWsrc/_pytest/approx.py568 # just return the absolute tolerance.COMMENT
MEDIUMsrc/_pytest/helpconfig.py22 """An argparse Action that will raise a PrintHelp exception in order to skipSTRING
LOWsrc/_pytest/debugging.py319 # we can't just return `partial(pdb.runcall, testfunction)` because (onCOMMENT
MEDIUMsrc/_pytest/capture.py481 # target FD). The following approach is robust, I believe.COMMENT
MEDIUMsrc/_pytest/fixtures.py1079 # Used for node-based matching which is more robust than string matching.COMMENT
AI Structural Patterns7 hits · 7 pts
SeverityFileLineSnippetContext
LOWsrc/_pytest/pytester_assertions.py37CODE
LOWsrc/_pytest/subtests.py72CODE
LOWsrc/_pytest/pytester.py593CODE
LOWsrc/_pytest/nodes.py555CODE
LOWsrc/_pytest/freeze_support.py16CODE
LOWsrc/_pytest/mark/expression.py245CODE
LOWsrc/_pytest/_code/code.py701CODE
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsrc/_pytest/runner.py214 value = value.replace("\x00", "(null)")CODE
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsrc/_pytest/pytester.py797Create new text file(s) in the test directory. :param ext: The extension the file(s) should use, inSTRING
Fake / Example Data2 hits · 3 pts
SeverityFileLineSnippetContext
LOWtesting/test_assertion.py2369 long_text = "Lorem ipsum dolor sit amet " * 10CODE
LOWtesting/test_assertion.py2369 long_text = "Lorem ipsum dolor sit amet " * 10CODE
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/_pytest/unittest.py557 # We need to check if "twisted.trial.unittest" is specifically present in sys.modules.COMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/_pytest/fixtures.py1213 # We make sure to do this after checking for cached value to avoidCOMMENT