def test_read_xyz(mock_open): output_line = "@ << A; B, C, D >> = -30.99202444" mock_open.return_value = mock_loop(output_line) calc = RspCalc('XDIPLEN', 'YDIPLEN', 'ZDIPLEN', 'WDIPLEN') assert calc.get_output() == -30.99202444
def test_read_yz(mock_open): output_line = "@ -<< XXQUADRU ; YDIPLEN >> = 4.395689062431D-01" mock_open.return_value = mock_loop(output_line) calc = RspCalc('XXQUADRU', 'YDIPLEN') assert calc.get_output() == -4.395689062431e-01
def test_read_xyz(mock_open): output_line = "@ omega B, omega C, QR value : 0.00000000 0.00000000 3.68627919" mock_open.return_value = mock_loop(output_line) calc = RspCalc('XDIPLEN', 'YDIPLEN', 'ZDIPLEN') assert calc.get_output() == 3.68627919
def test_read_energy(mock_open): output_line = "Final energy: 3.14" mock_open.return_value = mock_loop(output_line) calc = RspCalc() assert calc.get_output() == 3.14
def test_read_z(mock_open): output_line = "YDIPLEN total : -1.03702475" mock_open.return_value = mock_loop(output_line) calc = RspCalc('YDIPLEN') assert calc.get_output() == -1.03702475