Skip to content

Commit

Permalink
Refine test
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed Apr 3, 2024
1 parent 1fe0faf commit 5a24d34
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import tempfile
import typing

import numpy as np
Expand All @@ -21,7 +20,6 @@
"rendered_templates",
)
)
TMP = tempfile.gettempdir()


@pytest.fixture
Expand Down Expand Up @@ -80,7 +78,8 @@ def bare_db(
# Publish and load database
audb.publish(db_path, pytest.VERSION, repository)
db = audb.load(name, version=pytest.VERSION, verbose=False)
assert db.root.startswith(TMP)
tmp_root = str(tmpdir.parts()[1])
assert db.root.startswith(tmp_root)
return db


Expand Down Expand Up @@ -132,7 +131,8 @@ def minimal_db(
# Publish and load database
audb.publish(db_path, pytest.VERSION, repository)
db = audb.load(name, version=pytest.VERSION, verbose=False)
assert db.root.startswith(TMP)
tmp_root = str(tmpdir.parts()[1])
assert db.root.startswith(tmp_root)
return db


Expand Down Expand Up @@ -226,7 +226,8 @@ def medium_db(
# Publish and load database
audb.publish(db_path, pytest.VERSION, repository)
db = audb.load(name, version=pytest.VERSION, verbose=False)
assert db.root.startswith(TMP)
tmp_root = str(tmpdir.parts()[1])
assert db.root.startswith(tmp_root)
return db


Expand Down

0 comments on commit 5a24d34

Please sign in to comment.