Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions tests/parsers/test_abinit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import unittest
from dfttopif.parsers.abinit import AbinitParser
from ..test_pif import unpack_example, delete_example
from pypif.obj.common.value import Value
import os
import shutil

class TestAbinitParser(unittest.TestCase):

def get_parser(self,name):
'''Get a PwscfParser for a certain test'''
unpack_example(os.path.join('examples', 'abinit', name+'.tar.gz'))
return AbinitParser(name)

def test_Si_static(self):
"""Test that Si static example parses with AbinitParser"""
# Parse the results
parser = self.get_parser('abinit_Si_static')

# Test the settings
self.assertEquals('ABINIT', parser.get_name())

# Test
self.assertEquals(0.0, parser.get_cutoff_energy().scalars[0].value)


if __name__ == '__main__':
unittest.main()