pytester: Representation of the full collection tree, for testing collection hooks & plugins #13204
Unanswered
MusicalNinjaDad
asked this question in
Ideas
Replies: 1 comment 1 reply
-
Unfortunately its both incorrect and potential breaking on node tree changes It removes the setup /teardown cost aware test reordering and it's fragile towards changes like the directory node introduction and the instance node removal The eventually coming Definition node introduction would also break the expected trees there |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm starting to put a plugin together which will include collection hooks. The How-To on Working with non-python tests suggests "While developing your custom test collection and execution it’s also interesting to just look at the collection tree:"
I'd rather have tests do this both during development and later for regression.
Note: I know this is incomplete, buggy and largely broken - it's not even complete for my own specific purposes...
To that end I put together:
which allows me to have tests of the form:
[Note: collection_nodes.items is the output of
pytester.genitems([example_dir.path.name])
]Any thoughts? Is this worth pursuing in a more generic context? or even personally within my own project (am I wasting time recreating something that already exists?)
Beta Was this translation helpful? Give feedback.
All reactions