Topic: Find where testertest*.py files actually live in the repo and whether they contain runnable test functions or are infrastructure/harness code

Date: 2026-05-29

Time: 11:36

Where testertest*.py Files Live and What They Are

Location Pattern

Every 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.

They Are Real, Runnable Tests — Not Harness Code

These files are genuine test suites, not infrastructure. Three pieces of evidence:

1. They contain def test_* functions that assert behavior

Every 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.

2. They use two execution modes

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.

3. They import only the module under test — no shared harness

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.

4. Some use class-based grouping

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.

Why the 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.

Topics to Explore

Beliefs