-
Notifications
You must be signed in to change notification settings - Fork 571
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change pytest.skip to pytest.xfail #1799
Conversation
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.
Looks great @gjhiggins - thank you.
No worries, “glad to be of service” |
inexplicable gh-actions failures. I have $ diff -x .venv \
> -x .git \
> -x var \
> -x __pycache__ \
> -x .pytest_cache \
> -x rdflib.egg-info \
> -x runcleantests.sh \
> -uNr rdflib rdflib-github-fix-for-issue1793-convert-skip-to-xfail
diff -x .venv -x .git -x var -x __pycache__ -x .pytest_cache -x rdflib.egg-info -x runcleantests.sh -uNr rdflib/test/test_dawg.py rdflib-github-fix-for-issue1793-convert-skip-to-xfail/test/test_dawg.py
--- rdflib/test/test_dawg.py 2022-01-06 18:12:23.969808430 +0000
+++ rdflib-github-fix-for-issue1793-convert-skip-to-xfail/test/test_dawg.py 2022-04-09 18:07:43.250240884 +0100
@@ -212,7 +212,7 @@
query_path: PurePath = file_uri_to_path(query)
if uri in skiptests:
- pytest.skip()
+ pytest.xfail()
try:
g = Dataset()
@@ -359,7 +359,7 @@
resfile_path = file_uri_to_path(resfile) if resfile else None
if uri in skiptests:
- pytest.skip()
+ pytest.xfail()
def skip(reason="(none)"):
print("Skipping %s from now on." % uri)
diff -x .venv -x .git -x var -x __pycache__ -x .pytest_cache -x rdflib.egg-info -x runcleantests.sh -uNr rdflib/test/test_parsers/test_swap_n3.py rdflib-github-fix-for-issue1793-convert-skip-to-xfail/test/test_parsers/test_swap_n3.py
--- rdflib/test/test_parsers/test_swap_n3.py 2022-03-23 10:35:51.182684269 +0000
+++ rdflib-github-fix-for-issue1793-convert-skip-to-xfail/test/test_parsers/test_swap_n3.py 2022-04-09 17:02:25.778716787 +0100
@@ -71,7 +71,7 @@
def generictest(e):
"""Documentation"""
if e.skip:
- pytest.skip("%s skipped, known issue" % e.name)
+ pytest.xfail("%s skipped, known issue" % e.name)
g = rdflib.Graph()
for i in [rdf, rdfs, xsd, owl, test, n3test, rdft, triage, mf, qt]:
g.bind(str(i), i) So I don't know where the errors are coming from |
Will check it later today. |
Much appreciated, thank you. |
It is failing because of this: |
This alleviates the problem for now: |
CI passes now, I will merge tomorrow if there is no further feedback. |
Fix for issue #1793
Summary of changes
Change
pytest.skip
topytest.xfail
intest/test_dawg.py
andtest/test_parsers/test_swap_n3.py
Checklist
so maintainers can fix minor issues and keep your PR up to date.