Skip to content

Commit

Permalink
fix: bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz committed Feb 4, 2019
1 parent dcd5e33 commit 6fd66ea
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions aimdfragmentation/test/test_fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,15 @@

class Test_all(unittest.TestCase):
def test_fragment(self):
folder = "testfiles"
xyzfilename = 'test_fragment.xyz'
if not os.path.exists(folder):
os.makedirs(folder)
with open(os.path.join(folder, xyzfilename), 'wb') as f:
f.write(pkg_resources.resource_string(__name__, 'test.xyz'))
with open(xyzfilename, 'w') as f:
f.write(pkg_resources.resource_string(__name__, 'test.xyz').decode())
af = AIMDFragmentation(cutoff=6.0, xyzfilename=xyzfilename)
af.run()
with open(af.outputenergyfile) as f:
logging.info("Energy:")
print(f.read())
with open(af.outputenergyfile) as f:
logging.info("Force:")
print(f.read())
for filename in (af.outputenergyfile, af.outputfile):
with open(filename) as f:
logging.info(filename)
print(f.read())


if __name__ == '__main__':
Expand Down

0 comments on commit 6fd66ea

Please sign in to comment.