Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing abinit test failures #61

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
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()