File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed
Expand file tree Collapse file tree 3 files changed +30
-1
lines changed 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" :
"[email protected] " }
16+ with open (home_dir / "diffpyconfig.json" , "w" ) as f :
17+ json .dump (home_config_data , f )
18+
19+ yield tmp_path
Original file line number Diff line number Diff line change 55
66import pytest
77
8- from diffpy .nmf_mapping .nmf_mapping . main import main
8+ from diffpy .nmf_mapping .main import main
99
1010dir = Path (__file__ ).parent .resolve ()
1111
Original file line number Diff line number Diff line change 1+ """Unit tests for __version__.py
2+ """
3+
4+ import diffpy .nmf_mapping
5+
6+
7+ def test_package_version ():
8+ """Ensure the package version is defined and not set to the initial placeholder."""
9+ assert hasattr (diffpy .nmf_mapping , "__version__" )
10+ assert diffpy .nmf_mapping .__version__ != "0.0.0"
You can’t perform that action at this time.
0 commit comments