Skip to content

Commit

Permalink
try to get the self tests working again
Browse files Browse the repository at this point in the history
  • Loading branch information
briantoby committed Jan 24, 2025
1 parent c608065 commit 5ecb5cf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/test_scripting.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@
import numpy.testing as npt
home = os.path.dirname(__file__)
work = tempfile.gettempdir()
work='/tmp/'

import importlib # fixup path if GSASII not installed into Python
import importlib.util # fixup path if GSASII not installed into Python
if importlib.util.find_spec('GSASII') is None:
print('GSAS-II not installed in Python: Hacking sys.path')
os.environ["GSASII_YOLO_PATH"] = "True"
sys.path.append(os.path.dirname(home))

else:
# this seems to be needed to run scriptable inside the testing framework
# TODO: figure out why this is
os.environ["GSASII_YOLO_PATH"] = "True"


import GSASII.GSASIIscriptable as G2sc

def test_refine():
Expand Down

0 comments on commit 5ecb5cf

Please sign in to comment.