summaryrefslogtreecommitdiff
path: root/test/test_store
Commit message (Collapse)AuthorAgeFilesLines
* test: Eliminate flake8 errors in tests (#2353)Iwan Aucamp2023-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | Eliminate some occurrences of the following flake8 errors in tests: * E265 block comment should start with '# ' * E266 too many leading '#' for block comment * E402 module level import not at top of file * E712 comparison to False should be 'if cond is False:' or 'if not cond:' * E712 comparison to True should be 'if cond is True:' or 'if cond:' * E722 do not use bare 'except' * F401 ... imported but unused * F403 ... used; unable to detect undefined names * F405 ... may be undefined, or defined from star imports: ... * F541 f-string is missing placeholders * F841 local variable 'result' is assigned to but never used * N806 variable 'TEST_DIR' in function should be lowercase This is pursuant to eliminating [flakeheaven](https://github.com/flakeheaven/flakeheaven), as it no longer supports the latest version of flake8 [[ref](https://github.com/flakeheaven/flakeheaven/issues/132)].
* fix: correct imports and `__all__` (#2340)Iwan Aucamp2023-04-124-21/+9
| | | | | | | | Disable [`implicit_reexport`](https://mypy.readthedocs.io/en/stable/config_file.html#confval-implicit_reexport) and eliminate all errors reported by mypy after this. This helps ensure that import statements import from the right module and that the `__all__` variable is correct.
* test: fix deprecation warnings (#2260)Iwan Aucamp2023-03-111-1/+1
| | | | This changes the test the code to avoid deprecation warnings that occur. Mostly related to changes in python threading and pytest.
* build(deps-dev): bump black from 22.12.0 to 23.1.0 (#2248)dependabot[bot]2023-03-111-4/+0
|
* fix: missing query string params in sparqlconnector when using POST method ↵David Andreoletti2023-01-021-0/+76
| | | | | | | (#2180) The SPARQLConnector instance created by a SPARQLStore instance providing endpoint url + query string params using POST method did not append the query string to endpoint url. Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
* fix: don't reuse same dict for headers in SPARQL HTTP requestsgitmpje2022-12-241-0/+46
| | | | | | Copy kwargs dict to prevent POST headers to be used in GET request and vice versa. Co-authored-by: Mark van der Pas <mark.van.der.pas@semaku.com> Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
* fix: add charset encoding to SPARQLConnector.update() request. (#2112)Robert Casties2022-09-152-9/+32
| | | | | Add encoding "charset=UTF-8" to Content-Type header in `SPARQLConnector.update()` request. Fixes #2095
* test: content-type handling with SPARQLStore + CONSTRUCT queries (#2092)Iwan Aucamp2022-08-231-0/+132
| | | | | | Confirm various content type values are handled correctly with CONSTRUCT queries and SPARQLStore. This aims to confirm that #1195 is fixed.
* test: convert more test from unittest to pytest (#2089)Iwan Aucamp2022-08-232-46/+36
| | | Fairly straight forward conversions with minimal changes.
* test: remove unused imports in test codeIwan Aucamp2022-05-171-1/+0
| | | | | | | | | | This patch removes unused imports in test code. This is mainly to remove the potential snag for flake8/flakeheaven. The actual cleanup was done with `pycln --all test`. Also: - Remove superflous `pass` statements.
* Address lingering instances of deprecated `tempfile.mktemp` (#1942)Graham Higgins2022-05-151-2/+2
| | | Updated two instances of lingering deprecated `tempfile.mktemp` usage to use current safe tempfile idiom.
* Improved mock HTTP ServerIwan Aucamp2022-05-122-32/+41
| | | | | This changes the HTTP server mock to a more versatile implementation with support for more HTTP methods.
* test: move test utility modules into `test/utils/` (#1879)Iwan Aucamp2022-05-043-4/+3
| | | | | | | This patch moves all test utility modules into `test/utils/` and the tests for these modules into `test/utils/test/`. This is to make test utilities more organized and in preparation for adding more test utilities related to test suites.
* Fixes, improvements and test for namespace (re)-binding on stores.Iwan Aucamp2022-04-191-0/+210
| | | | | | | | | | | - Added store specific tests for namespace binding and rebinding. - Copied @gjhiggins fix for `rdflib.plugins.stores.memory.Memory.bind` to `rdflib.plugins.stores.memory.SimpleMemory.bind`. - Changed `bind` on `Memory`, `SimpleMemory`, `BerkleyDB` stores to explicitly check for `is not None`/`is None` instead of falsey/truthy. - Added `pytest.util._coalesce` to do null coalescing, for more info see deferred PEP-505 https://peps.python.org/pep-0505/.
* [pre-commit.ci] auto fixes from pre-commit.com hookspre-commit-ci[bot]2022-04-154-17/+15
| | | | for more information, see https://pre-commit.ci
* take the opportunity to remove references to unittest, as suggestedGraham Higgins2022-04-121-2/+1
|
* migrate yet more tests to pytestGraham Higgins2022-04-121-8/+4
|
* more test re-orgGraham Higgins2022-04-021-0/+54
|
* trim to just test of Memory storeGraham Higgins2022-04-011-196/+15
|
* handle DBURIs in a more secure fashionGraham Higgins2022-04-011-9/+31
|
* ensure all fixtures iterate over non-excluded pluginstores, refactor common ↵Graham Higgins2022-04-011-34/+133
| | | | code out of fixtures into separate functions
* Migrate some tests to pytestGraham Higgins2022-03-245-882/+954
| | | | Preparatory work for dataset-rework, eases review
* update imports and filepathsGraham Higgins2022-03-192-3/+3
|
* revert more unintentionally-changed test filesGraham Higgins2022-03-196-846/+782
|
* revert unintended changeGraham Higgins2022-03-181-127/+112
|
* extend test suite re-orgGraham Higgins2022-03-188-0/+1682