testertest*.py files actually live in the repo and whether they contain runnable test functions or are infrastructure/harness codeDate: 2026-05-29
Time: 11:36
testertest*.py Files Live and What They AreEvery testertest*.py file lives one level deep inside a module-specific directory in the target repo (/Users/ben/git/ddia-implementations). The naming convention is <module-dir>/testertest<module>.py:
| Directory | Test File |
|-----------|-----------|
| b-tree-storage-engine/ | testertestbtree.py |
| bloom-filter/ | testertestbloom_filter.py |
| change-data-capture/ | testertestcdc.py |
| write-ahead-log/ | testertestwal.py |
| gossip-protocol/ | testertestgossip_protocol.py |
| write-skew-detection/ | testertestssi.py |
| fencing-tokens/ | testertestfencing_tokens.py |
| leader-follower-replication/ | testertestreplication.py |
| secondary-index-partitioning/ | testertestsecondaryindexpartitioning.py |
| sstable-and-compaction/ | testertestsstable.py |
| unbundled-database/ | testertestunbundled_database.py |
| ... | (and more — 195 def test_ functions total across all files) |
There is no centralized tests/ directory. Each module is self-contained: implementation code and its test file sit side by side.
These files are genuine test suites, not infrastructure. Three pieces of evidence:
def test_* functions that assert behaviorEvery file is packed with standard test functions that import the module under test, exercise its API, and assert results. For example, b-tree-storage-engine/testertestbtree.py:8 defines testbasicputget() which creates a BTree, inserts data, and asserts lookups return the right values. The grep found 195 such functions across all testertest_*.py files.
pytest-compatible: Some files use pytest fixtures and pytest.raises (e.g., change-data-capture/testertestcdc.py:12 defines a @pytest.fixture, and bloom-filter/testertestbloom_filter.py:4 imports pytest). These run via pytest.
Standalone _main runner: Others skip pytest entirely and include a if name == 'main': block that calls each test function in sequence, printing "PASSED" per test. See b-tree-storage-engine/testertestbtree.py:192 and write-ahead-log/testertestwal.py:172. These run with plain python testertest_*.py.
The import grep (greptesterimports) shows each file imports from its own module (from btree import BTree, from wal import WriteAheadLog, etc.) plus standard library utilities (tempfile, os). The conftest grep returned zero matches — there is no shared conftest.py or test harness that references these files. Each test file is fully self-contained.
Files like fencing-tokens/testertestfencingtokens.py and leader-follower-replication/testertest_replication.py organize tests into classes (TestLockBasics, TestFailover, etc.) — 63 class definitions total. These are standard pytest test classes, not base classes or mixins.
tester_ prefix?The prefix is unusual — standard pytest discovery expects test*.py. This suggests the files were generated or templated by an external tool (likely the code-expert pipeline referenced in CLAUDE.md), and the tester prefix distinguishes them from any hand-written test*.py files. To run them with pytest you'd need either pytest testertestbtree.py (explicit path) or a pyproject.toml/conftest.py that adjusts pythonfiles discovery.
tester-pytest-discovery — Check whether a pyproject.toml or pytest.ini configures pythonfiles = testertest_*.py to allow standard pytest discovery of these filesb-tree-storage-engine/testertestbtree.py — A clean example of the standalone runner pattern — no pytest dependency, pure assert + _main_ blockchange-data-capture/testertestcdc.py — Demonstrates the pytest-fixture pattern with @pytest.fixture and pytest.raises, contrast with the standalone runner filesleader-follower-replication/testertestreplication.py:TestFailover — Shows how class-based test grouping models a complex distributed-systems scenariotest-generation-origin — Investigate how these testertest*.py files were originally generated (the code-expert pipeline?) and whether they're meant to be edited by handtester-test-files-colocated — Every testertest*.py file lives in the same directory as the module it tests, not in a centralized tests/ foldertester-test-no-shared-harness — There is no shared conftest, base class, or test harness across testertest*.py files; each is fully self-containedtester-test-dual-runner — Some testertest*.py files are pytest-only (using fixtures/raises), while others include a _main_ block for standalone execution — the two patterns coexist across modulestester-test-195-functions — The repo contains 195 def test* functions and 63 test classes spread across all testertest_*.py filestester-prefix-non-standard — The tester prefix means these files won't be discovered by pytest's default test*.py glob without explicit configuration