In #553 #554 #611 we have added support for the pytest. This caused that we are supporting two testing libraries in parallel, which adds code and conceptual complexity to coreblocks. Particularly I have hit in that problem when adding the hypothesis in #573, where I had to integrate it with both unittest and pytest at the same time.
This PR want to drop unittest support and left only pytest. The most important changes are in TestCaseWithSimulator class where much of code from run_simulation was moved to separate fixtures. Whats more it was possible to drop the dirty trick with wrapping functions in DependencyContext.
There is a little drawback. If we want to use DependencyContext in setUp function we have to add one more line:
In #553 #554 #611 we have added support for the
pytest
. This caused that we are supporting two testing libraries in parallel, which adds code and conceptual complexity to coreblocks. Particularly I have hit in that problem when adding thehypothesis
in #573, where I had to integrate it with bothunittest
andpytest
at the same time.This PR want to drop
unittest
support and left onlypytest
. The most important changes are inTestCaseWithSimulator
class where much of code fromrun_simulation
was moved to separate fixtures. Whats more it was possible to drop the dirty trick with wrapping functions inDependencyContext
.There is a little drawback. If we want to use
DependencyContext
insetUp
function we have to add one more line:You can observe that in
test/fu/functional_common.py
. It is because we have to say thatconfigure_dependency_context
has to run before setup function.ToDo:
Please say what is your opinion about these changes? Are they ok for you and can I migrate all the tests?