mirror of
https://github.com/triqs/dft_tools
synced 2025-01-03 01:55:56 +01:00
Completed 'test_parse_groups()'
This commit is contained in:
parent
3516ebd285
commit
8b60a91e49
29
python/converters/vasp/test/inpconf/test7.cfg
Normal file
29
python/converters/vasp/test/inpconf/test7.cfg
Normal file
@ -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
|
||||||
|
|
||||||
|
|
@ -268,6 +268,15 @@ class TestSpecialParsers(unittest.TestCase):
|
|||||||
with self.assertRaisesRegexp(Exception, err_mess):
|
with self.assertRaisesRegexp(Exception, err_mess):
|
||||||
conf_pars.parse_groups()
|
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()
|
# test_parse_input()
|
||||||
|
Loading…
Reference in New Issue
Block a user