Skip to content

Add unit test for lock-file cleanup in pytest_configure #82

@gaurav

Description

@gaurav

Background

tests/conftest.py pytest_configure deletes both the Google Sheet CSV cache files and their .lock siblings at the start of each run. The lock-path bug (.csv.lock vs .lock) was fixed in PR #67, but there is no regression test covering this cleanup path.

What's missing

A unit/integration test that:

  1. Creates a fake babel_validation_gsheet_<hash>.csv and its companion babel_validation_gsheet_<hash>.lock in tempfile.gettempdir().
  2. Invokes the pytest_configure cleanup logic.
  3. Asserts that both files are removed and that no .csv.lock stale file remains.

Without this test, a future refactor could silently reintroduce the same bug.

Notes

  • Identified during the Opus code review of PR Add GitHub issue tests #67.
  • The cleanup logic lives in tests/conftest.py::pytest_configure (lines 35–50).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions