@@ -20,14 +20,15 @@ def test_single_parse(self):
20
20
0.066918004004 0.037148121400 0.438703133000 0.892971208700
21
21
0.021708243634 -0.001125195500 -0.059693171300 0.120101316500
22
22
"""
23
-
23
+
24
24
parsed = parse_single_cp2k_basisset (content .splitlines ())
25
25
26
26
result = {
27
27
'name' : 'DZVP-MOLOPT-GTH-q1' ,
28
28
'element' : 'H' ,
29
+ 'n_el' : 1 ,
29
30
'tags' : ['DZVP' , 'MOLOPT' , 'GTH' , 'q1' ],
30
- 'aliases' : ['DZVP-MOLOPT-GTH' ],
31
+ 'aliases' : ['DZVP-MOLOPT-GTH-q1' , 'DZVP-MOLOPT-GTH ' ],
31
32
'blocks' : [{
32
33
"n" : 2 ,
33
34
"l" : [(0 , 2 ), (1 , 1 )],
@@ -61,10 +62,10 @@ def test_roundtrip_single(self):
61
62
62
63
# ignore the first element since the family name might contain aliases we are not going to write
63
64
self .assertEqual (
64
- [l .strip () for l in content .splitlines ()[1 :]],
65
- [l .lstrip () for l in output .getvalue ().splitlines ()[1 :]]
66
- )
67
-
65
+ [l .strip () for l in content .splitlines ()[1 :]], # do not compare the name
66
+ [l .lstrip () for l in output .getvalue ().splitlines ()[2 :]] # do not compare the comment or the name
67
+ )
68
+
68
69
def test_roundtrip_multi_shell (self ):
69
70
70
71
with open ("tests/BASIS_pob-TZVP.H" , 'r' ) as fhandle :
@@ -76,11 +77,11 @@ def test_roundtrip_multi_shell(self):
76
77
write_cp2k_basisset (
77
78
output ,
78
79
** {k : v for k , v in parsed .items () if k in ['element' , 'name' , 'blocks' ]},
79
- fmts = ("{: > #12.9f} " , "{: > #12.9f} " ) # this basis uses a shorter format
80
+ fmts = (" > #12.9f" , " > #12.9f" ) # this basis uses a shorter format
80
81
)
81
82
82
83
# ignore the first element since the family name might contain aliases we are not going to write
83
84
self .assertEqual (
84
- [l .strip () for l in content .splitlines ()[1 :]],
85
- [l .lstrip () for l in output .getvalue ().splitlines ()[1 :]]
86
- )
85
+ [l .strip () for l in content .splitlines ()[1 :]], # do not compare the name
86
+ [l .lstrip () for l in output .getvalue ().splitlines ()[2 :]] # do not compare the comment or the name
87
+ )
0 commit comments