Skip to content
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

Merged
merged 3 commits into from Apr 12, 2022
Merged

change pytest.skip to pytest.xfail #1799

merged 3 commits into from Apr 12, 2022

Conversation

ghost
Copy link

@ghost ghost commented Apr 9, 2022

Fix for issue #1793

Summary of changes

Change pytest.skip to pytest.xfail in test/test_dawg.py and test/test_parsers/test_swap_n3.py

Checklist

  • Checked that there aren't other open pull requests for the same change.
  • Checked that all tests and type checking passes.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

Copy link
Member

@aucampia aucampia left a 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.

@ghost
Copy link
Author

ghost commented Apr 9, 2022

Looks great @gjhiggins - thank you.

No worries, “glad to be of service”

@ghost
Copy link
Author

ghost commented Apr 10, 2022

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 ☹️

@aucampia
Copy link
Member

So I don't know where the errors are coming from

Will check it later today.

@ghost
Copy link
Author

ghost commented Apr 10, 2022

So I don't know where the errors are coming from

Will check it later today.

Much appreciated, thank you.

@aucampia
Copy link
Member

@aucampia
Copy link
Member

So I don't know where the errors are coming from

Will check it later today.

Much appreciated, thank you.

This alleviates the problem for now:

@aucampia
Copy link
Member

CI passes now, I will merge tomorrow if there is no further feedback.

@aucampia aucampia linked an issue Apr 11, 2022 that may be closed by this pull request
@aucampia aucampia merged commit a347f8d into RDFLib:master Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert skipped tests to xfail tests
1 participant