Describe the bug
Notebook tests are not being given names in junit reports. This makes it difficult to differentiate different tests in CI tools like bamboo that parse junit.xml to determine test names.
To Reproduce
Steps to reproduce the behavior:
From any repo, such as nbmake-examples, run nbmake from pytest and have it generate a junit report, e.g., "pytest --junit-xml=junit.xml --nbmake"
Open the junit report for a notebook test and look at the "name" property for each test, which will be blank.
Expected behavior
Names should be populated with something similar to "classname".
Screenshots
Notebook tests (no names) junit output from nbmake-examples (notice the lack of names given for each test):
Example of what doctests produce for names:
How nameless tests show up in bamboo (no info on which test this was):
Desktop (please complete the following information):
OS: Windows and Linux
Additional context
I believe a very easy fix for this would be to simply pass a name from the NotebookItem class during initialization, by changing pytest_items.py from:
Describe the bug Notebook tests are not being given names in junit reports. This makes it difficult to differentiate different tests in CI tools like bamboo that parse junit.xml to determine test names.
To Reproduce Steps to reproduce the behavior:
Expected behavior Names should be populated with something similar to "classname".
Screenshots Notebook tests (no names) junit output from nbmake-examples (notice the lack of names given for each test):
Example of what doctests produce for names:
How nameless tests show up in bamboo (no info on which test this was):
Desktop (please complete the following information):
Additional context I believe a very easy fix for this would be to simply pass a name from the NotebookItem class during initialization, by changing pytest_items.py from:
To: