mirror of
https://github.com/triqs/dft_tools
synced 2024-11-14 10:03:46 +01:00
f86038a7fd
All imports inside the test cases refer now to paths relative to TRIQS python library path. For example, `import vaspio` is replaced with `import applications.dft.converters.plovasp.vasio` In this way all tests can be executed wtih `build_pytriqs` provided that the package is installed (the same practice as with other 'dft_tools' tests). Also, the underscore can now be removed from subdirectory names because there is no more conflict with module names.
40 lines
1.3 KiB
Python
40 lines
1.3 KiB
Python
|
|
import applications.dft.converters.plovasp.vaspio
|
|
from applications.dft.converters.plovasp.inpconf import ConfigParameters
|
|
from applications.dft.converters.plovasp.plotools import check_data_consistency
|
|
from applications.dft.converters.plovasp.elstruct import ElectronicStructure
|
|
import mytest
|
|
|
|
################################################################################
|
|
#
|
|
# TestDataConsistency
|
|
#
|
|
################################################################################
|
|
class TestDataConsistency(mytest.MyTestCase):
|
|
"""
|
|
Function:
|
|
|
|
def check_data_consistency(pars, el_struct)
|
|
|
|
Scenarios:
|
|
|
|
- **if** a shell contains ions of different types **raise** AssertionError
|
|
"""
|
|
# Scenario 1
|
|
def test_shell_ion_types(self):
|
|
pass
|
|
# conf_file = 'wrong_shell.cfg'
|
|
# pars = ConfigParameters(conf_file)
|
|
# pars.parse_input()
|
|
# vasp_data = vaspio.VaspData('./', read_all=False)
|
|
# vasp_data.poscar.from_file('./', poscar_filename='POSCAR.complex')
|
|
# el_strct = ElectronicStructure(vasp_data)
|
|
#
|
|
# print pars.shells
|
|
# print vasp_data.poscar.type_of_ion
|
|
#
|
|
# err_mess = "Each projected shell must"
|
|
# with self.assertRaisesRegexp(Exception, err_mess):
|
|
# check_data_consistency(pars, el_struct)
|
|
|