Skip to content

Fix the html folder/zip file name#106

Merged
abalasa-amd merged 2 commits intomainfrom
abalasa.fix-zip-file
Mar 24, 2026
Merged

Fix the html folder/zip file name#106
abalasa-amd merged 2 commits intomainfrom
abalasa.fix-zip-file

Conversation

@abalasa-amd
Copy link
Copy Markdown
Contributor

@abalasa-amd abalasa-amd commented Mar 24, 2026

Motivation

The HTML report folder and zip archive were being named after the first raw pytest argument instead of the actual test suite name.

Technical Details

files relied on args[0] to derive the suite name, assuming it was always the test file path. When users pass extra pytest flags (e.g. -vvv, -s) via extra_pytest_args, these can appear before the test path in the args list.

Fix: Instead of using args[0], iterate over the args and find the first argument that:

  1. Does not start with - (skip flags)
  2. Ends with .py (must be an actual Python test file)
  3. Strips ::test_function suffixes before extracting the stem

Falls back to "test" (for the log directory) or htmlpath.stem (for the zip name) if no .py argument is found.

Test Plan

Test Result

Submission Checklist

@abalasa-amd abalasa-amd marked this pull request as ready for review March 24, 2026 06:26
@abalasa-amd abalasa-amd merged commit c1b82f5 into main Mar 24, 2026
2 checks passed
abalasa-amd added a commit that referenced this pull request Mar 25, 2026
* Fix the html folder/zip file name

* Store suite name in config for  report naming

---------

Co-authored-by: abalasa <abalasa@xilinx.com>
abalasa-amd added a commit that referenced this pull request Mar 25, 2026
* Fix the html folder/zip file name

* Store suite name in config for  report naming

---------

Co-authored-by: abalasa <abalasa@xilinx.com>
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