File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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"
You can’t perform that action at this time.
0 commit comments