We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b19a95b commit a6dc73eCopy full SHA for a6dc73e
tests/conftest.py
@@ -1,12 +1,28 @@
1
import importlib.resources
2
+import json
3
import logging
4
from functools import lru_cache
5
+from pathlib import Path
6
7
import pytest
8
9
logger = logging.getLogger(__name__)
10
11
12
+@pytest.fixture
13
+def user_filesystem(tmp_path):
14
+ base_dir = Path(tmp_path)
15
+ home_dir = base_dir / "home_dir"
16
+ home_dir.mkdir(parents=True, exist_ok=True)
17
+ cwd_dir = base_dir / "cwd_dir"
18
+ cwd_dir.mkdir(parents=True, exist_ok=True)
19
+
20
+ home_config_data = {"username": "home_username", "email": "[email protected]"}
21
+ with open(home_dir / "diffpyconfig.json", "w") as f:
22
+ json.dump(home_config_data, f)
23
+ yield tmp_path
24
25
26
# diffpy.structure
27
@lru_cache()
28
def has_diffpy_structure():
0 commit comments