Skip to content

Commit 3c89a8e

Browse files
committed
Fixup 3c75b98
1 parent 617d64a commit 3c89a8e

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

tests/data/H2O_dist.ccpvdz.ccpvdzjkfit.molden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[Molden Format]
2-
made by pyscf v[redacted]
2+
made by pyscf v[2.11.0]
33
[Atoms] (AU)
44
O 1 8 0.00000000000000 0.00000000000000 0.00000000000000
55
H 2 1 1.86346082115973 0.00000000000000 0.00000000000000

tests/test_molden.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/usr/bin/env python3
22

33
import os
4-
from subprocess import run
54
import tempfile
6-
import filecmp
75
import numpy as np
86
from qstack import compound
97
from qstack.fields.density2file import coeffs_to_molden
@@ -15,9 +13,13 @@ def test_molden():
1513
c = np.load(path+'/data/H2O_dist.ccpvdz.ccpvdzjkfit.npy')
1614
tmpfile = tempfile.mktemp() + '.molden'
1715
coeffs_to_molden(auxmol, c, tmpfile)
18-
# making sure the test works on other versions of pyscf
19-
run(['sed', '-i', r's/made by pyscf v\[.*\]$/made by pyscf v[redacted]/', tmpfile]) # noqa: S603, S607
20-
assert(filecmp.cmp(path+'/data/H2O_dist.ccpvdz.ccpvdzjkfit.molden', tmpfile))
16+
with open(tmpfile) as f:
17+
output = f.readlines()
18+
output = ''.join(output[0:1]+output[2:])
19+
with open(path+'/data/H2O_dist.ccpvdz.ccpvdzjkfit.molden') as f:
20+
output0 = f.readlines()
21+
output0 = ''.join(output0[0:1]+output0[2:])
22+
assert np.all(output==output0)
2123

2224

2325
if __name__ == '__main__':

0 commit comments

Comments
 (0)