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
+
1
8
from GSASII import GSASIIElem
2
9
3
10
def test_get_xsection ():
4
11
xsection = GSASIIElem .GetXsectionCoeff ('Fe' )
5
12
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 5
5
import sys
6
6
import numpy as np
7
7
8
- import importlib
8
+ import importlib . util
9
9
if importlib .util .find_spec ('GSASII' ) is None : # hack path if GSASII not installed into Python
10
10
home = os .path .dirname (__file__ )
11
11
sys .path .append (os .path .dirname (home ))
You can’t perform that action at this time.
0 commit comments