Skip to content

Commit 5f50910

Browse files
committed
improved test for get_dataset_absolute_path
1 parent 94a3a8e commit 5f50910

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

tests/end_to_end_tests/test_database_functions.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,12 @@ def test_get_dataset_absolute_path(dummy_file, schema):
4848
assert v == os.path.join(
4949
str(tmp_root_dir), dset_ownertype, dset_owner, dset_relpath
5050
)
51-
else:
52-
assert v == os.path.join(
53-
str(tmp_root_dir),
54-
schema,
55-
dset_ownertype,
56-
dset_owner,
57-
dset_relpath,
58-
)
51+
# Cannot easily make a similar test for non-sqlite since schema type
52+
# ("production", "working") is not what's used to form the path; the
53+
# full schema name is.
5954

55+
# See if the file is actually there
56+
assert os.path.exists(v)
6057

6158
def test_find_entry(dummy_file):
6259
"""
@@ -134,7 +131,7 @@ def test_insert_keywords(dummy_file, mykeyword):
134131
135132
Make sure case sensitivity is ignored (keywords are always entered as lower case
136133
"""
137-
134+
138135
# Establish connection to database
139136
tmp_src_dir, tmp_root_dir = dummy_file
140137
datareg = DataRegistry(root_dir=str(tmp_root_dir), namespace=DEFAULT_NAMESPACE)

0 commit comments

Comments
 (0)