Skip to content

Commit abc8a9c

Browse files
committed
remove unnecessary files, add conftest
1 parent ea77121 commit abc8a9c

5 files changed

Lines changed: 29 additions & 155 deletions

File tree

tests/__init__.py

Lines changed: 0 additions & 85 deletions
This file was deleted.

tests/conftest.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import json
2+
from pathlib import Path
3+
4+
import pytest
5+
6+
7+
@pytest.fixture
8+
def user_filesystem(tmp_path):
9+
base_dir = Path(tmp_path)
10+
home_dir = base_dir / "home_dir"
11+
home_dir.mkdir(parents=True, exist_ok=True)
12+
cwd_dir = base_dir / "cwd_dir"
13+
cwd_dir.mkdir(parents=True, exist_ok=True)
14+
15+
home_config_data = {"username": "home_username", "email": "home@email.com"}
16+
with open(home_dir / "diffpyconfig.json", "w") as f:
17+
json.dump(home_config_data, f)
18+
19+
yield tmp_path

tests/debug.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

tests/run.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

tests/test_version.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""Unit tests for __version__.py."""
2+
3+
import diffpy.srreal
4+
5+
6+
def test_package_version():
7+
"""Ensure the package version is defined and not set to the initial
8+
placeholder."""
9+
assert hasattr(diffpy.srreal, "__version__")
10+
assert diffpy.srreal.__version__ != "0.0.0"

0 commit comments

Comments
 (0)