Drop unittest from TestCaseWithSimulator#642
Merged
tilk merged 15 commits intoApr 10, 2024
Merged
Conversation
added 2 commits
April 7, 2024 11:38
tilk
approved these changes
Apr 8, 2024
Member
|
Some unit tests still use |
Contributor
Author
|
Good catch. I will prepare a separate review for that to doesn't delay this one. |
unittest library supportunittest from TestCaseWithSimulator
awariac
approved these changes
Apr 9, 2024
tilk
pushed a commit
to kuznia-rdzeni/transactron
that referenced
this pull request
Nov 25, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thehypothesisin #573, where I had to integrate it with bothunittestandpytestat the same time.This PR want to drop
unittestsupport and left onlypytest. The most important changes are inTestCaseWithSimulatorclass where much of code fromrun_simulationwas 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
DependencyContextinsetUpfunction 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_contexthas 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?