Open schooler-hpe opened 1 year ago
It's definitely possible that it's using the wrong folder name but I can't see how, the code is in the tavern/testutils/pytesthook/file.py file but at a glance it seems to be doing the right thing
I can't reproduce this locally
$ ls subfolder_*
subfolder_1:
test_auth_key.tavern.yaml
subfolder_2:
test_auth_key.tavern.yaml
$ py.test subfolder_*
...
subfolder_1/test_auth_key.tavern.yaml::Test 1 PASSED
subfolder_2/test_auth_key.tavern.yaml::Test 2 PASSED
$ py.test subfolder_* --collect-only
...
<YamlFile tests/integration/subfolder_1/test_auth_key.tavern.yaml>
/home/michael/code/tavern/tests/integration/subfolder_1/test_auth_key.tavern.yaml
<YamlItem Test 1>
Test 1:
1: Test stage
<YamlFile tests/integration/subfolder_2/test_auth_key.tavern.yaml>
/home/michael/code/tavern/tests/integration/subfolder_2/test_auth_key.tavern.yaml
<YamlItem Test 2>
Test 2:
1: Test stage
I originally submitted this as a pytest issue but they suggested that I report it here instead.
In each of two directories, I have one Tavern test file that will run with pytest:
When I execute them both with one invocation, the summary output shows an incorrect test file path.
The summary output should show 3-destructive/test_components.tavern.yaml as the last test and not 2-disruptive/test_components.tavern.yaml which doesn't exist.
Additional comment from the pytest thread that was closed: "I suggest to report this in the tavern repository, as I suspect there might be an issue on how they are creating the test items."