Skip to content

Convert the bedtools intersect integration tests to the project's test conventions #236

Open

Description

@conradbzura

tests/integration/bedtools/test_intersect.py predates the project's test conventions and none of its tests follow them. Test Guide §3, §4 and §5 make three of these a MUST:

  • Naming. Tests are named test_intersect_<mode>_... with no should_ clause, so a failure name states the subject but not the expected outcome.
  • Docstrings. All use uppercase GIVEN / WHEN / THEN prose with no leading Test ... summary line, rather than the guide's capitalised-section form.
  • AAA comments. None carry # Arrange / # Act / # Assert.

The marker requirement is already satisfied through the module-level pytestmark.

Raised as A8 in the round-1 review of #235 (.sdlc/reviews/issue-#109/review-1.md), where five of five python reviewers flagged it and all five rated it Advisory for the same reason: every test in the module shares the non-conforming form, so converting only the two touched by that PR would leave the file in two styles. The reviewers were unanimous that a split-style file is worse than either style consistently applied.

Scope. Convert the module wholesale in one pass — 13 test functions as of 8b58119. Mechanical, no behaviour change. tests/test_duckdb_iejoin.py is the in-repo reference for the target form.

Worth checking while in there: the review noted that the module's several "identical" interval datasets already disagree on scores, which is the drift that inline-per-test data invites. #235 hoisted one such pair into a partial_overlap_intervals fixture in conftest.py; the remaining inline datasets could follow the same route where two or more tests genuinely share one.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions