- Notifications
You must be signed in to change notification settings - Fork302
Support pytest 4#429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Support pytest 4#429
Uh oh!
There was an error while loading.Please reload this page.
Conversation
hugovk left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please could you fix the flake8 errors?
./html5lib/tests/test_sanitizer.py:71:20: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:72:20: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:75:20: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:76:20: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:79:20: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:80:20: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:83:20: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:84:20: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:97:16: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:98:16: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:105:16: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:106:16: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:114:16: E128 continuation line under-indented for visual indent./html5lib/tests/test_sanitizer.py:115:16: E128 continuation line under-indented for visual indentmcepl commentedNov 8, 2019
Better? |
hugovk commentedNov 8, 2019
Good, thanks! Flake8 now passes on Travis CI. |
Uh oh!
There was an error while loading.Please reload this page.
codecov-io commentedNov 8, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #429 +/- ##==========================================- Coverage 90.52% 88.69% -1.83%========================================== Files 50 50 Lines 6973 6952 -21 Branches 1328 1308 -20 ==========================================- Hits 6312 6166 -146- Misses 502 603 +101- Partials 159 183 +24
Continue to review full report at Codecov.
|
felixonmars commentedNov 20, 2019
It fails here with pytest 5.2.4, perhaps pytest 5 changed again? I changed the line to and it works fine now. Would you consider to include the change too? The error: |
jdufresne commentedJan 5, 2020
That change makes sense to me. Can you go ahead with that? |
mcepl commentedJan 6, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Not sure, what’s wrong now. Is it some bug inside of pytest? Do I do something wrong? Locally, it passes without any problem both withpytest 4.6.6 andpytest 5.2.4. |
felixonmars commentedJan 6, 2020
The original non-decorator pytest.mark.skipif line looks wrong to me from the beginning. It should be a decorated @pytest.mark.skipif in the next line IMHO. |
mcepl commentedJan 6, 2020
OK, I am too stupid and too sleepy, right now. Could I get a proper diff of what I should do, please? |
gsnedders left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The majority of these functions that yield tests all yield the same test function, right? Can we not just rename those functions, rename the functions they call, and call the existing functions with@pytest.mark.parametrize?
i.e.,def test_encoding becomesdef generate_encoding, the first argument from the yields is dropped, and then we end up with:
@pytest.mark.parameterize("data, encoding", generate_encoding())def test_parser_encoding(data, encoding)(renamed fromrunParserEncodingTest?)
| assertencoding==stream.charEncoding[0].name,errorMessage(data,encoding,stream.charEncoding[0].name) | ||
| @pytest.mark.skip(reason="broken under pytest4") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This will need to be fixed before we can move to 4.x
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
html5lib/tests/test_treewalkers.py Outdated
| fortreeinsorted(treeTypes.items()): | ||
| forintext,attrs,expectedinsm_tests: | ||
| yieldrunTreewalkerEditTest,intext,expected,attrs,tree | ||
| runTreewalkerEditTest(intext,expected,attrs,tree) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
As above, we do want these as separate tests.
Uh oh!
There was an error while loading.Please reload this page.
Seehtml5lib#429 forupgrading to >= 4
Seehtml5lib#429 forupgrading to >= 4
gsnedders commentedJun 9, 2020
Fixed by#497 |
Rebase of#414 by@hroncok on the top of the current master, and two small nits fixed.