Skip to content

DM-55972: Switch test suite from direct vcrpy use to pytest-recording - #195

Open
mfisherlevine wants to merge 2 commits into
mainfrom
tickets/DM-55972
Open

DM-55972: Switch test suite from direct vcrpy use to pytest-recording#195
mfisherlevine wants to merge 2 commits into
mainfrom
tickets/DM-55972

Conversation

@mfisherlevine

Copy link
Copy Markdown
Contributor

Test classes are now marked with @pytest.mark.vcr and configured via tests/conftest.py, which keeps the existing flat cassette directory and bare-function-name cassette naming so no recordings need regenerating. vcrpy (which pytest-recording wraps) is retained only for setUpClass, which runs outside the per-test fixture the plugin uses.

mfisherlevine and others added 2 commits September 3, 2026 16:15
Test classes are now marked with @pytest.mark.vcr and configured via
tests/conftest.py, which keeps the existing flat cassette directory and
bare-function-name cassette naming so no recordings need regenerating.
vcrpy (which pytest-recording wraps) is retained only for setUpClass,
which runs outside the per-test fixture the plugin uses, and for the
setUp in test_ics, which is recorded separately from its tests and so
nests its own cassette inside the plugin's.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pytest-vcr and pytest-recording are mutually exclusive, and the stack
environment will move from the former to the latter at some point.
Rather than having to land this branch at the exact moment that
happens, conftest.py now detects which plugin is loaded and adapts to
it: the record mode is read from --vcr-record or --record-mode as
appropriate, and the cassette name is overridden via both
vcr_cassette_name and default_cassette_name.

This commit is purely additive and should be reverted once the
environment has moved to pytest-recording.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

mypy-coverage report

✅ All 803 definitions are fully annotated.

  • Root: /home/runner/work/summit_utils/summit_utils
  • Config: mypy.ini
  • Files scanned: 61
  • Files excluded: 0

Summary

metric value
✅ body-checked by mypy 100.0%
✅ fully annotated 100.0%
annotated 803
partial 0
unannotated 0

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 23.38%. Comparing base (f50eea2) to head (a54a458).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #195   +/-   ##
=======================================
  Coverage   23.38%   23.38%           
=======================================
  Files          38       38           
  Lines        7077     7077           
=======================================
  Hits         1655     1655           
  Misses       5422     5422           
Files with missing lines Coverage Δ
python/lsst/summit/utils/efdUtils.py 25.47% <ø> (ø)
python/lsst/summit/utils/tmaUtils.py 25.06% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant