diff --git a/python/converters/vasp/test/inpconf/test7.cfg b/python/converters/vasp/test/inpconf/test7.cfg new file mode 100644 index 00000000..4b03d4e0 --- /dev/null +++ b/python/converters/vasp/test/inpconf/test7.cfg @@ -0,0 +1,29 @@ +[General] + +[Group 1] +SHELLS = 1 2 +EMIN = -7.6 +EMAX = 3.0 + +[Group 2] +SHELLS = 3 +EMIN = -1.6 +EMAX = 2.0 + +[Shell 1] +LSHELL = 2 +IONS = 5..8 + +[Shell 2] +LSHELL = 1 +IONS = 1..4 + +RTRANSFORM = 0.0 1.0 0.0 + 1.0 0.0 0.0 + 0.0 0.0 1.0 + +[Shell 3] +LSHELL = 3 +IONS = 1..4 + + diff --git a/python/converters/vasp/test/inpconf/test_inpconf.py b/python/converters/vasp/test/inpconf/test_inpconf.py index 883293e7..ca816514 100644 --- a/python/converters/vasp/test/inpconf/test_inpconf.py +++ b/python/converters/vasp/test/inpconf/test_inpconf.py @@ -268,6 +268,15 @@ class TestSpecialParsers(unittest.TestCase): with self.assertRaisesRegexp(Exception, err_mess): conf_pars.parse_groups() +# Scenario 2 + conf_pars = ConfigParameters('test7.cfg') + conf_pars.parse_groups() + res = conf_pars.groups + expected = [{'index': 1, 'shells': [1, 2], 'emin': -7.6, 'emax': 3.0}, + {'index': 2, 'shells': [3], 'emin': -1.6, 'emax': 2.0}] + self.assertListEqual(res, expected) + + ################################################################################ # # test_parse_input()