Skip to content

Commit 4b7a086

Browse files
committed
Merge branch 'master' of github.com:materialsproject/pymatgen
2 parents c1c5892 + c9a2893 commit 4b7a086

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

pymatgen/util/testing.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,12 @@
2424

2525

2626
class PymatgenTest(unittest.TestCase):
27-
"""
28-
Extends unittest.TestCase with functions (taken from numpy.testing.utils)
29-
that support the comparison of arrays.
30-
"""
27+
"""Extends unittest.TestCase with several assert methods for array and str comparison."""
3128

3229
_multiprocess_shared_ = True
3330
MODULE_DIR = Path(__file__).absolute().parent
3431
STRUCTURES_DIR = MODULE_DIR / "structures"
35-
try:
36-
TEST_FILES_DIR = Path(SETTINGS["PMG_TEST_FILES_DIR"])
37-
except KeyError:
38-
import warnings
39-
40-
warnings.warn(
41-
"It is recommended that you set the PMG_TEST_FILES_DIR environment variable explicitly. "
42-
"Now using a fallback location based on relative path from this module."
43-
)
44-
TEST_FILES_DIR = MODULE_DIR / ".." / ".." / "test_files"
32+
TEST_FILES_DIR = Path(SETTINGS.get("PMG_TEST_FILES_DIR", MODULE_DIR / ".." / ".." / "test_files"))
4533

4634
TEST_STRUCTURES: ClassVar[dict[str, Structure]] = {} # Dict for test structures to aid testing.
4735
for fn in STRUCTURES_DIR.iterdir():

0 commit comments

Comments
 (0)