3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-30 00:44:34 +02:00
dft_tools/python/converters/vasp/test/plotools/test_consistency.py
Oleg E. Peil 5c3b3d0b8d Added several tests
Tests for 'select_bands()' and class 'ProjectorShell' have been added.
The function and class methods have been fixed accordingly to pass
the tests.
2015-10-11 13:55:04 +02:00

35 lines
922 B
Python

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