Skip to content

Commit

Permalink
Remove hardcoded assets folder for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rlan committed May 29, 2024
1 parent e0996ea commit 796ba98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

@pytest.fixture(params=bcmt.__INSTITUTIONS__)
def assets(tmp_path, request):
name = request.param
base_dir = Path("./tests/data")
base_dir = request.path.parent / "data"
assert base_dir.is_dir(), f"Expected folder missing: {str(base_dir.resolve())}"
name = request.param
data_dir = base_dir / name
assert data_dir.is_dir(), f"Expected folder missing: {str(data_dir.resolve())}"
in_file = data_dir / "test.csv"
Expand Down
5 changes: 2 additions & 3 deletions tests/test_data2.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import pytest

from pathlib import Path
import beancount_multitool as bcmt


@pytest.fixture
def base_dir():
dir = Path("./tests/data2")
def base_dir(request):
dir = request.path.parent / "data2"
assert dir.is_dir(), f"Expected folder missing: {str(dir.resolve())}"
yield dir

Expand Down

0 comments on commit 796ba98

Please sign in to comment.