Skip to content

Change set_filenames in single_run fixture to use file name instead of folder path - #4567

Merged
timothy-nunn merged 2 commits into
mainfrom
pytest-dir-tmp-path
Sep 2, 2026
Merged

Change set_filenames in single_run fixture to use file name instead of folder path#4567
timothy-nunn merged 2 commits into
mainfrom
pytest-dir-tmp-path

Conversation

@clmould

@clmould clmould commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Previously this test was using the tmp_path in set_filenames, leading to files being created with the name of the test inside a folder of the same name:
image

This change means the files created during a run of pytest now have the name of the file preserved:
image

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@clmould
clmould requested a review from a team as a code owner August 28, 2026 08:38
@codecov-commenter

codecov-commenter commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.85%. Comparing base (85b3f55) to head (53ce3a0).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4567      +/-   ##
==========================================
- Coverage   49.86%   49.85%   -0.01%     
==========================================
  Files         151      151              
  Lines       29867    29875       +8     
==========================================
+ Hits        14892    14894       +2     
- Misses      14975    14981       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread tests/unit/test_main.py Outdated
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
@clmould
clmould requested a review from timothy-nunn September 2, 2026 09:18
@timothy-nunn
timothy-nunn merged commit bd5e644 into main Sep 2, 2026
10 of 11 checks passed
@timothy-nunn
timothy-nunn deleted the pytest-dir-tmp-path branch September 2, 2026 09:44
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.

3 participants