Skip to content

Commit

Permalink
Check if cif2cell is available before running test
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
  • Loading branch information
quantumsteve committed Oct 5, 2021
1 parent aca1bf6 commit 20d2e84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions nexus/lib/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@ def check(self,write=True,exit=False,full=False,n=0,pad=' '):
spglib_available = False
pycifrw_available = False
seekpath_available = False
cif2cell_available = False

numpy_supported = False
scipy_supported = False
Expand All @@ -852,6 +853,7 @@ def check(self,write=True,exit=False,full=False,n=0,pad=' '):
spglib_supported = False
pycifrw_supported = False
seekpath_supported = False
cif2cell_supported = False

try: # versioning info is never worth failure
versions = Versions()
Expand All @@ -864,6 +866,7 @@ def check(self,write=True,exit=False,full=False,n=0,pad=' '):
spglib_available = versions.available('spglib')
pycifrw_available = versions.available('pycifrw')
seekpath_available = versions.available('seekpath')
cif2cell_available = versions.available('cif2cell')

numpy_supported = versions.supported('numpy')
scipy_supported = versions.supported('scipy')
Expand All @@ -873,6 +876,7 @@ def check(self,write=True,exit=False,full=False,n=0,pad=' '):
spglib_supported = versions.supported('spglib')
pycifrw_supported = versions.supported('pycifrw')
seekpath_supported = versions.supported('seekpath')
cif2cell_available = versions.supported('cif2cell')
except:
versions = None
#end try
Expand Down
2 changes: 1 addition & 1 deletion nexus/tests/unit/test_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def test_read_write():



if versions.pycifrw_available:
if versions.pycifrw_available and versions.cif2cell_available:
def test_read_cif():
"""
Read La2CuO4 structure from a CIF file.
Expand Down

0 comments on commit 20d2e84

Please sign in to comment.