-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Customize test id on the terminal report #3140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @fontealpina, This is the code responsible for adding that Lines 507 to 512 in 0d96a5b
So it seems the collected node and the actual path are different, which might indicate some other problem or can be fixed in some other way. Can you provide a reproducible example? |
Hi, def pytest_configure(config):
config.rootdir = py.path.local(os.getcwd()) My target would be use the cwd as rootdir instead of using the common ancestor directory. |
Running pytest with -v option, I am obtaining an output of this type:
ToolTest/test/bug_001/test.py::TestBug001::test_bug_001 <- test.py PASSED
I would like to customize the test id, e.g. removing
<- test.py
to get:ToolTest/test/bug_001/test.py::TestBug001::test_bug_001 PASSED
To do this, I tried to write a plugin with the hook:
def pytest_runtest_logstart(nodeid, location):
but seems that my hook is called after the test id has already been printed on the terminal.
So I was wondering if there is a way to do this?
Thanks
The text was updated successfully, but these errors were encountered: