Description
When relative_to() fails (test path not under test_dir), the two path computation methods behave inconsistently:
plugin.py — logs a warning with full diagnostic info:
except ValueError:
logger.warning(
f"Test script {testscript} (absolute: {path}) is not under test_dir "
f"{test_dir}, using filename only"
)
return path.stem
archive_inspector.py — silent fallback:
except ValueError:
return fallback_name
This creates inconsistent behavior: live test execution shows warnings in logs, but archive-extracted results silently use fallback names. Users see different test names depending on whether they're watching live progress vs reading the final report — the exact scenario the comment "mirrors the logic in the PyATS progress plugin" is supposed to prevent.
Proposed Solution
If the shared utility from #706 is implemented, both callers can add their own logging at the call site. If not, at minimum add a logger.warning() in archive_inspector.py to match plugin.py's behavior:
except ValueError:
logger.warning(
f"Test script {testscript} is not under test_dir {test_dir}, "
f"falling back to: {fallback_name}"
)
return fallback_name
Related Issues
Context
Introduced in #655. Both methods are documented as implementing the same logic, but their error handling already diverges.
Description
When
relative_to()fails (test path not undertest_dir), the two path computation methods behave inconsistently:plugin.py— logs a warning with full diagnostic info:archive_inspector.py— silent fallback:This creates inconsistent behavior: live test execution shows warnings in logs, but archive-extracted results silently use fallback names. Users see different test names depending on whether they're watching live progress vs reading the final report — the exact scenario the comment "mirrors the logic in the PyATS progress plugin" is supposed to prevent.
Proposed Solution
If the shared utility from #706 is implemented, both callers can add their own logging at the call site. If not, at minimum add a
logger.warning()inarchive_inspector.pyto matchplugin.py's behavior:Related Issues
Context
Introduced in #655. Both methods are documented as implementing the same logic, but their error handling already diverges.