#!/usr/bin/env python

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dirac import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()

f.add(from_string = 'Electronic energy',
      num_lines   = 3,
      rel_tolerance   = 1.0e-9)
f.add(from_string = 'Value of electronic part',
      num_lines   = 3,
      ignore_sign = True,
      rel_tolerance   = 5.0e-5)

test.run(['qrpa1.inp', 'excprp1.inp'], ['LiH.mol'], f)
test.run(['tpa1.inp'], ['He.mol'], f)

sys.exit(test.return_code)
