File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1+ import os
2+ import sys
3+ import importlib .util
4+ if importlib .util .find_spec ('GSASII' ) is None : # hack path if GSASII not installed into Python
5+ home = os .path .dirname (__file__ )
6+ sys .path .append (os .path .dirname (home ))
7+
18from GSASII import GSASIIElem
29
310def test_get_xsection ():
411 xsection = GSASIIElem .GetXsectionCoeff ('Fe' )
512 assert len (xsection ) > 0
13+
14+ if __name__ == '__main__' :
15+ # run self-tests
16+ test_get_xsection ()
17+ print ("OK" )
Original file line number Diff line number Diff line change 55import sys
66import numpy as np
77
8- import importlib
8+ import importlib . util
99if importlib .util .find_spec ('GSASII' ) is None : # hack path if GSASII not installed into Python
1010 home = os .path .dirname (__file__ )
1111 sys .path .append (os .path .dirname (home ))
You can’t perform that action at this time.
0 commit comments