Change default teardown_module() name. #10557
Replies: 3 comments
-
Hi, Currently no, that name is hardcoded. I think however you can implement a plugin which does that. |
Beta Was this translation helpful? Give feedback.
-
@nicoddemus Wow amazingly fast reply! I have some experience with writing pytest plugins already and feel quite comfortable with that. Would you have a minimal example which you could share as a starting point? Or give me an idea as to what hook function would be best to use? I was considering to somehow change the function name from |
Beta Was this translation helpful? Give feedback.
-
I might have found something which could help: |
Beta Was this translation helpful? Give feedback.
-
Is there a way to change the
setup_module
function name? I am implementing a custom plugin which runs custom test cases, the test cases are formatted like this:I can configure the pytest collection to collect test cases which match
main
like as stated in the documentation.My question is, can I change the plugin somehow to also collect
tearDown()
instead of the defaultteardown_module(module)
as stated in the documentation?
https://docs.pytest.org/en/7.1.x/example/pythoncollection.html#changing-naming-conventions
Beta Was this translation helpful? Give feedback.
All reactions