Use the new testing machinery for test_examples#676
Merged
Conversation
…. Thank you, I knew that.
This was referenced Aug 10, 2022
Contributor
|
Much better! |
fpliger
approved these changes
Aug 12, 2022
fpliger
left a comment
Contributor
There was a problem hiding this comment.
Way better! That's awesome to see! Thank you !
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.
This PR refactor
test_examples.pyto use the new testing machinery.Moreover, instead of using a single semi-complicated parametrized test, it uses an individual test for each example.
Currently most of them are very similar because they just check the page title and a simple pattern, but by doing so we make it possible to improve them: the idea is that each of them should become be improved to actually check that the example does what it is intended, like what we do for example with
test_simple_clock:pyscript/pyscriptjs/tests/test_zz_examples.py
Lines 59 to 74 in e3ffd89
Three tests are marked with
@xfailbecause of issues which were found during the refactoring: #673, #677, #678. I think this should not be a blocker to merge this PR, since the problems were already present and the old tests worked just because they were not as strict as the new ones.