Skip to content

How can I get rootdir or absolute paths of the discovered tests? #12686

Answered by nicoddemus
misrasaurabh1 asked this question in Q&A
Discussion options

You must be logged in to vote

To complement @RonnyPfannschmidt's answer, use a custom plugin and implement pytest_collect_modifyitems: each item will have its full path available then. It is also much more stable/safer than parsing the output, as the hook is part of the public/stable API.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@nicoddemus
Comment options

Answer selected by misrasaurabh1
@misrasaurabh1
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants