3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-22 05:02:20 +02:00
dft_tools/python/converters/vasp/test/_plotools/test_consistency.py

35 lines
922 B
Python
Raw Normal View History

import vaspio
from inpconf import ConfigParameters
import mytest
################################################################################
#
# TestDataConsistency
#
################################################################################
class TestDataConsistency(mytest.MyTestCase):
"""
Function:
def read_plocar(filename)
Scenarios:
- **if** file PLOCAR does not exist **raise** IOError
- **if** PLOCAR is truncated **raise** IOError
- **if** the precision flag is not 4 or 8 **raise** ValueError
- **if** PLOCAR with prec=8 is read **compare** the output
- **if** PLOCAR with prec=4 is read **compare** the output
"""
# Scenario 1
def test_example(self):
conf_file = 'example.cfg'
pars = ConfigParameters(conf_file)
pars.parse_input()
vasp_data = vaspio.VaspData('./')
print pars.shells
print pars.groups