summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* add script to generated DefinedNamespaces, with testssdo-httpsnicholascar2021-12-014-0/+42061
|
* Merge pull request #1456 from newinnovations/masterNicholas Car2021-11-211-0/+89
|\ | | | | Fix JSON-LD data import adds trailing slashes to IRIs (#1443)
| * Add two additional tests for `norm_url`Iwan Aucamp2021-11-061-0/+10
| | | | | | | | Tests suggested by @newinnovations.
| * Add tests for norm_url.Iwan Aucamp2021-10-291-0/+79
| |
* | Change mock HTTP server to listen on 127.0.0.1 by defaultIwan Aucamp2021-11-141-4/+4
| | | | | | | | | | This is so that it works properly on MacOS which does not permit listening on random loopback addresses for user processes.
* | Skip berkeleydb tests if there is no berkeleydbIwan Aucamp2021-11-131-7/+10
| |
* | Fix skipping in test/test_issue200.pyIwan Aucamp2021-11-131-2/+4
| | | | | | | | Skipping was done incorrectly and failed on Windows.
* | Fix pytest warning when EARL reporting plugin in loadedIwan Aucamp2021-10-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | This eliminates this warning: ``` .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) ``` By adding PYTEST_DONT_REWRITE to the plugin module docstring.
* | Some other minor improvementsIwan Aucamp2021-10-253-4/+5
| | | | | | | | | | - Removed unused ignores. - Use official description text of RDFLib in DOAP used in EARL report.
* | Migrate from nosetest to pytestIwan Aucamp2021-10-2447-645/+764
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix generation of w3c testsNatanael Arndt2021-10-184-8/+12
| |
* | Make some yield tests normal testsNatanael Arndt2021-10-1810-27/+22
|/
* Merge branch 'master' into ttl2ttl2Nicholas Car2021-10-175-3/+77
|\
| * Merge pull request #1448 from tirkarthi/fix-assertNicholas Car2021-10-171-1/+1
| |\ | | | | | | Use assertTrue instead of assert_ for python 3.11 compatibility.
| | * Use assertTrue instead of assert_ for python 3.11 compatibility.Karthikeyan Singaravelan2021-10-161-1/+1
| | |
| * | Merge pull request #1438 from cclauss/fix-undefined-namesNicholas Car2021-10-141-1/+1
| |\ \ | | | | | | | | Undefined name: tmppath --> self.tmppath
| | * | Undefined name: tmppath --> self.tmppathChristian Clauss2021-10-121-1/+1
| | |/
| * | Fix Graph.parse URL handling on windowsIwan Aucamp2021-10-122-1/+43
| |/ | | | | | | | | | | | | | | | | | | Using `pathlib.Path("http://example.com/").exists()` on windows causes an exception as a URL is not a valid path, while `os.path.exists("http://example.com/")` just returns false. This patch reverts _create_input_source_from_location to using `os.path.exists()` instead of pathlib.Path to make it possible to parse graphs from http URLs on windows.
| * Make Store.namespaces an empty generator (#1432)Iwan Aucamp2021-10-111-0/+25
| | | | | | Fixes #1431
| * Add owl:rational and owl:real to match standard.Boris Pelakh2021-10-071-0/+7
| |
* | parsing test & commentsNicholas Car2021-10-021-0/+6
| |
* | PEP8 onlyNicholas Car2021-10-021-20/+25
| |
* | complete turtle2 serializer with testsNicholas Car2021-10-021-0/+196
|/
* Merge pull request #1407 from iafork/iwana-20210910T2303Nicholas Car2021-09-272-2/+32
|\ | | | | Fix mypy type errors and add mypy to .drone.yml
| * Change Graph.serialize to throw for invalid destinationsIwan Aucamp2021-09-121-0/+17
| | | | | | | | | | | | | | | | | | `Graph.serialize` was just logging a warning if the supplied `destination` was not valid, but it would be better to fail if the method does not perform the requested operation. This change makes `Graph.serialize` throw if the supplied `destination` can't be written to.
| * Fix mypy type errors and add mypy to .drone.ymlIwan Aucamp2021-09-101-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #1311 Add `mypy` to .drone.yml and fix type errors that come up. Not type checking examples or tests. Other changes: - fix return value for `Graph.serialize` (refs #1394) - remove default value for `rdflib.plugins.sparql.algebra.translateAlgebra` (refs #1322) - add .dockerignore to reduce context size and make docker quicker to run. - add .flake8 config to ignore line length as black is managing formatting. - add mypy to docker-compose, makefile and tox.ini - fix the way csv2rdf is invoked to ensure that the right code gets executed.
* | version set to 6.0.16.0.1Nicholas Car2021-09-171-4/+5
| |
* | Add test for adding JSON-LD to guess_format()Alex Nelson2021-09-101-0/+4
|/ | | | | | | | | | | | This is a follow-on patch to: e778e9413510721c2fedaae56d4ff826df265c30 Test was confirmed to pass by running this on the current `master` branch, and confirmed to fail with e778e941 reverted. nosetests test/test_parse_file_guess_format.py Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
* Merge pull request #1382 from juanjosegzl/iter-datasetNicholas Car2021-08-281-1/+30
|\ | | | | Iterate over dataset return quads
| * test for Dataset __iter__Nicholas Car2021-08-281-1/+30
| |
* | Allowing Container Membership Properties in RDF namespace (#873)Mark Watts2021-08-041-1/+4
|/ | | | | - Also, deleting _RDFNamespace since it is not used in rdflib since #1074
* blacked everything6.0.0Nicholas Car2021-07-2050-660/+1240
|
* Merge pull request #1074 from hsolbrig/masterNicholas Car2021-07-1520-90/+147
|\ | | | | Migration from ClosedNamespace to DeclaredNamespace
| * Namespace can be used as strEdmond Chuc2021-07-151-1/+1
| |
| * Fix testsEdmond Chuc2021-07-151-5/+4
| |
| * Fix namespace test to handle exception during test for ClosedNamespace behaviourEdmond Chuc2021-07-141-3/+4
| |
| * Fix some importsEdmond Chuc2021-07-141-3/+4
| |
| * Merge branch 'master' into hsolbrig/masterEdmond Chuc2021-07-142880-11/+44465
| |\ | | | | | | | | | | | | | | | | | | # Conflicts: # rdflib/namespace/__init__.py # rdflib/plugins/sparql/operators.py # test/test_namespace.py
| * | Update test for the new DefinedNamespace namespaces. Remove sh:example in ↵Edmond Chuc2021-07-081-4/+4
| | | | | | | | | | | | test as it does not exist. Instead, add in sh:Info.
| * | Merge branch 'master' into hsolbrig/masterEdmond Chuc2021-07-08127-567/+4006
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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
| * | | Fix typoEdmond Chuc2021-07-081-1/+1
| | | |
| * | | Change warn from DeclaredNamespace -> DefinedNamespace.Edmond Chuc2021-07-081-1/+1
| | | |
| * | | Fix test test_closed_namespaceEdmond Chuc2021-07-081-2/+2
| | | |
| * | | Found that pesky missing Namespace bug.hsolbrig2020-05-261-2/+0
| | | | | | | | | | | | | | | | Thanks @tbugs !
| * | | Fix more travis issues and problems.hsolbrig2020-05-264-6/+8
| | | | | | | | | | | | | | | | | | | | Note - the doctest in `rdflib/__init__.py` fails 50% of the time because there isn't a definite order in the turtle serialization Also, we still have a mystery issue of why `Namespace` isn't included in `from rdflib import *`
| * | | Refactor - module names don't match class nameshsolbrig2020-05-268-31/+45
| | | | | | | | | | | | | | | | | | | | For some reason the sequence of processing is different in Travis than in PyCharm. Changing the module names eliminates any possibility of confusion. Also fixed a number of warnings, whines and general unhappiness in the build process.
| * | | Change to absolute imports to attempt to fix a Travis issuehsolbrig2020-05-261-10/+10
| | | | | | | | | | | | | | | | Fix a few odd's and ends warnings as well
| * | | Migration from ClosedNamespace to DeclaredNamespacehsolbrig2020-05-2616-58/+96
| | | | | | | | | | | | | | | | Passes all unit tests, but did have to remove '.' from manifest and earl imports. May have to restore...
* | | | Add tests for xsd:tokenEdmond Chuc2021-07-141-0/+35
| |_|/ |/| |
* | | Add unit tests for issue #1294 with @expectedFailureIwan Aucamp2021-07-133-1/+118
| | | | | | | | | | | | | | | Also add type annotations to rdflib.compare to make it easier to understand the code.