diff options
author | Munyoki Kilyungi | 2024-10-02 06:55:01 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-10-02 06:59:11 +0300 |
commit | 94b3003768ff0854a0a52ef55fd90be286c09d62 (patch) | |
tree | 7a9bdddb1037915130c2b81b416ea15c8b9b0690 /tests | |
parent | 757f674573af5eb7ef1b41b5021de8a9a40a05e8 (diff) | |
download | genenetwork3-94b3003768ff0854a0a52ef55fd90be286c09d62.tar.gz |
Use pathlib to fetch the directory path for tests.
* tests/fixtures/rdf.py: import pathlib.
(rdf_setup): Use pathlib to get the dir name for the tests folder.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fixtures/rdf.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/fixtures/rdf.py b/tests/fixtures/rdf.py index 64d3107..98c4058 100644 --- a/tests/fixtures/rdf.py +++ b/tests/fixtures/rdf.py @@ -1,4 +1,5 @@ """Test fixtures to set up a test named graph for loading RDF data.""" +import pathlib import os import tempfile import subprocess @@ -24,7 +25,7 @@ SPARQL_CONF = { @pytest.fixture(scope="session") def rdf_setup(): """Upload RDF to a Virtuoso named graph""" - dir_path = os.path.dirname(__file__).split("fixtures")[0] + dir_path = pathlib.Path(__file__).parent.parent file_path = os.path.join( dir_path, "test_data/ttl-files/test-data.ttl", |