You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #655 rewrote _get_test_name() in plugin.py to use the NAC_TEST_TEST_DIR environment variable for computing relative test names. This is the core bug fix for #653, but it has zero unit test coverage. The only coverage comes from E2E tests, which validate stdout output but can't pinpoint failures in the name computation logic.
Missing Test Cases
Happy path: env var set, test file under test_dir → dot-notation name
Test file directly in test_dir root: test_dir/verify_foo.py → verify_foo
Suggested File
tests/unit/pyats_core/progress/test_plugin.py
Context
#655 rewrote this method. The E2E tests (test_stdout_pyats_test_names_are_relative, test_stdout_symlinked_test_has_relative_name) provide black-box coverage, but unit tests are needed to validate the logic directly and make debugging easier when failures occur.
Description
PR #655 rewrote
_get_test_name()inplugin.pyto use theNAC_TEST_TEST_DIRenvironment variable for computing relative test names. This is the core bug fix for #653, but it has zero unit test coverage. The only coverage comes from E2E tests, which validate stdout output but can't pinpoint failures in the name computation logic.Missing Test Cases
test_dir→ dot-notation nametest_dir/nrfu/verify_bgp.py→nrfu.verify_bgprelative_to()raisesValueError→ falls back to stem, logs warningtest_dirpointing outside → still produces relative name (the entire point of fix: replace resolve() with absolute() in path comparisons to handle symlinked test files #656)test_dir/verify_foo.py→verify_fooSuggested File
tests/unit/pyats_core/progress/test_plugin.pyContext
#655 rewrote this method. The E2E tests (
test_stdout_pyats_test_names_are_relative,test_stdout_symlinked_test_has_relative_name) provide black-box coverage, but unit tests are needed to validate the logic directly and make debugging easier when failures occur.