Skip to content

Commit cc264d3

Browse files
committed
fixed pytests
1 parent 8a7abbe commit cc264d3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

tests/conftest.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,13 @@ def user_filesystem(tmp_path):
1717
json.dump(home_config_data, f)
1818

1919
yield tmp_path
20+
21+
22+
@pytest.fixture
23+
def datafile():
24+
"""Fixture to dynamically load any test file."""
25+
26+
def _load(filename):
27+
return "tests/testdata/" + filename
28+
29+
return _load

tests/test_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Unit tests for __version__.py."""
22

3-
import diffpy.structure # noqa
3+
import diffpy.structure
44

55

66
def test_package_version():

0 commit comments

Comments
 (0)