How to use pytest with a legacy in-house test framework #10649
Unanswered
danieljfarrell
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Hi @danieljfarrell, It depends whether or not your "custom" test framework supports external runners. But, you might want to migrate your entire test suites in pytest. Here's why:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
that strongl depends on the test framework, if your setup/tearown is in line enough with what pytest expects, it may be possible to just run things (with the caveat of maybe needing to enforce collection of things that have a init) else you pretty much have to implement own collection and own test item classes (just like the builtin unittest plugin does) |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I use pytest for all my new projects, but I'm working with a large python 3 project that implemented its own test framework; it does not inherit from unittest, it's pure custom python. It follows familiar idioms like setup/teardown, test are class based with assert methods e.g.
self.assert_true
etc.I'd like to use pytest as a test runner for the legacy tests and start to write new tests using pytest.
How can I run my old tests with pytest? Is there any documentation about this use case? Or has someone done something similar before?
Beta Was this translation helpful? Give feedback.
All reactions