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
test: Add tests for SPARQL parsing and serialization #1810
test: Add tests for SPARQL parsing and serialization #1810
Conversation
The most controversial thing here, and what is most in need of review, is the expected failures: rdflib/test/test_sparql/test_result.py Lines 186 to 201 in 9b5ac57
Some parsers support the encodings, and some parsers support TEXT_IO, and some support BINARY_IO. In my view all parsers should support all of them, and all of those tests should pass, so the expected failures are correct in that they denote known issues, and we can fix the issues without breaking interfaces. I'm happy to extend support once we are in agreement there. |
Okay and it seems path handling completely fails on windows, adding xfails for that also, and will fix those also in a future patch. |
9b5ac57
to
b009fc5
Compare
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.
Solid stuff, useful to have.
This patch adds some tests for SPARQL serialization and deserialization with checks based on round tripping where possible. Some of these tests are expected failures in that they seem to pass fo some parsers or serializers, but not others. If there is agreement on what parameters should be supported we can fix the parsers and serializers to actually support them. There are also xfails for the handling of string paths on windows, as this seems to fail for all serializers.
b009fc5
to
4647247
Compare
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
rebased now onto master, two files in diff are result of pre-commit.ci applying black. |
Merged as this is only adding tests, not changing any tests. The xfail marked tests also seem valid as they pass for some parsers and some operating systems. Happy to adjust them in future PRs though. |
Summary of changes
This patch adds some tests for SPARQL serialization and deserialization
with checks based on round tripping where possible.
Some of these tests are expected failures in that they seem to pass fo
some parsers or serializers, but not others. If there is agreement on
what parameters should be supported we can fix the parsers and
serializers to actually support them.
There are also xfails for the handling of string paths on windows, as
this seems to fail for all serializers.
Other changes:
test/test_graph/test_graph.py
andtest/test_n3.py
. There are no other changes to these files other than applying black, and it is done by pre-commit.ci bot.Checklist
the same change.
so maintainers can fix minor issues and keep your PR up to date.