Skip to content

Commit 5ecb5cf

Browse files
committed
try to get the self tests working again
1 parent c608065 commit 5ecb5cf

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/test_scripting.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
import numpy.testing as npt
88
home = os.path.dirname(__file__)
99
work = tempfile.gettempdir()
10-
work='/tmp/'
1110

12-
import importlib # fixup path if GSASII not installed into Python
11+
import importlib.util # fixup path if GSASII not installed into Python
1312
if importlib.util.find_spec('GSASII') is None:
1413
print('GSAS-II not installed in Python: Hacking sys.path')
1514
os.environ["GSASII_YOLO_PATH"] = "True"
1615
sys.path.append(os.path.dirname(home))
17-
16+
else:
17+
# this seems to be needed to run scriptable inside the testing framework
18+
# TODO: figure out why this is
19+
os.environ["GSASII_YOLO_PATH"] = "True"
20+
21+
1822
import GSASII.GSASIIscriptable as G2sc
1923

2024
def test_refine():

0 commit comments

Comments
 (0)