| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch replace all uses of nose with pytest. It also includes a
pytest plugin for creating EARL reports for tests with a `rdf_test_uri`
parameter.
Some caveats:
- HTML report directory is now htmlcov instead of coverage
- There is some warning related to the EARL reporting plugin which I can't quite figure out:
```
.venv/lib64/python3.7/site-packages/_pytest/config/__init__.py:676
/home/iwana/sw/d/github.com/iafork/rdflib/.venv/lib64/python3.7/site-packages/_pytest/config/__init__.py:676: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: test.earl
self.import_plugin(import_spec)
```
This is not causing any problems as far as I can tell, but still annoying.
- python setup.py test won't work anymore, I can make it work but this
is not advised by pytest:
https://github.com/pytest-dev/pytest-runner/#deprecation-notice
- run_test.py is still there but it's not really referenced anymore from
anywhere and the options it accepts are completely different as it's options
were based on nose. I would say it should be removed entirely but for now
it is basically just a wrapper around pytest that basically does nothing.
- Removed references to test attributes as currently they are not being
used anywhere anyway, I guess we can add them back if there is some
use for them later.
- A lot of tests are still marked to skip when really they should be marked
with xfail. This is also affecting the RDFT test manifests and result in
reports saying tests are skipped when really we know they will fail and
they are only skipped for this reason. But there is no change here from
before, and pytest makes it easier to dynamically do expected failures.
Special thanks to Wes Turner for his advice and inputs on this process.
|
| | |
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
# Conflicts:
# rdflib/__init__.py
# rdflib/compat.py
# rdflib/namespace/__init__.py
# rdflib/plugins/parsers/rdfxml.py
# rdflib/plugins/serializers/rdfxml.py
# rdflib/tools/csv2rdf.py
# test/test_dawg.py
# test/test_namespace.py
# test/test_nt_misc.py
# test/test_rdfxml.py
# test/test_seq.py
# test/test_trig.py
# test/testutils.py
|
| | |
| |
| |
| |
| |
| |
| |
| | |
1) Change default format from 'xml' to 'turtle'
2) If destination is None and encoding is None, output a str, not bytes
3) Add a new convenience method to print the Graph contents (turtle by default)
Lots of fixes in tests to adapt to these changes (serialize is used a lot to check graph state in tests).
Blacked files which were involved in this change.
|
| | |
| |
| |
| | |
Signed-off-by: t0b3 <thomas.bettler@gmail.com>
|
| |/
|
|
| |
Passes all unit tests, but did have to remove '.' from manifest and earl imports. May have to restore...
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
opinions is mainly: no to long lines, but not at any cost.
notation3.py crashses autopep :D
Also rdflib/__init__.py gets completely broken
|
| |
|
|
| |
now six is used throughout.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
(Fixes issue 156)
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- only generate prefixes for predicates (thus much less gratuitous);
- use prefix if bound uri is used as subject or object (common in ontologies);
- prefixes are used for datatypes (if bound in the graph);
- integer and float literals are outputted as is (as supported by turtle and n3);
- prepared to use plain boolean literals in place (not active since the n3 parser doesn't yet support those..);
- for "rdf:nil" (the empty list), "()" is used;
- for n3 only, "=" is used for "owl:sameAs", and "=>" for log:implies;
- 4 space indents (not 5) and no spurious trailing spaces;
- space before periods;
- no newline before @prefix declarations, one after;
- added serializer flag "spacious" (defaults to False); if True:
- use two newlines after prefix declarations
- one extra newline at end of document
- top-level bnodes as "[]" instead of surrounding statements;
- nested bnodes start with "[ ", ends with " ]";
- some space/indent tweaks for n3 graph literals .
Changes to other parts:
- Added some more n3 test files and altered some n3 test code.
- The "n3()" method of "term.Literal" now uses the new "_literal_n3" method, which takes some optional parameters and is used directly by the turtle+n3 serializers.
- Added a bunch of doctests in Literal's "n3" and "_literal_n3".
- Registered "turtle" as a serialization format (due to the tokens ("=", "=>") supported by N3 but not by Turtle).
|
| | |
|
| | |
|
| |
|