Index: python-emmet-core/tests/conftest.py
===================================================================
--- python-emmet-core.orig/tests/conftest.py	2023-02-21 12:09:10.288027639 +0100
+++ python-emmet-core/tests/conftest.py	2023-02-21 18:43:37.833695838 +0100
@@ -1,8 +1,17 @@
 from pathlib import Path
 
 import pytest
-
+from pymatgen.core import SETTINGS
 
 @pytest.fixture(scope="session")
 def test_dir():
-    return Path(__file__).parent.parent.parent.joinpath("test_files").resolve()
+    try:
+        TEST_FILES_DIR = Path(SETTINGS["PMG_TEST_FILES_DIR"])
+    except KeyError:
+        import warnings
+        warnings.warn(
+            "It is recommended that you set the PMG_TEST_FILES_DIR environment variable explicitly. "
+            "Now using a fallback location based on relative path from this module."
+        )
+        TEST_FILES_DIR = Path(__file__).parent.parent.parent.joinpath("test_files").resolve()
+    return TEST_FILES_DIR
