3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-12 23:43:45 +01:00

Added test of input of ion equiv groups

This commit is contained in:
Oleg Peil 2018-05-04 16:21:27 +02:00 committed by Manuel
parent 14f8b1d9e1
commit 04e1e86a4b

View File

@ -102,6 +102,12 @@ class TestParseStringIonList(arraytest.ArrayTestCase):
with self.assertRaisesRegexp(AssertionError, err_mess):
self.cpars.parse_string_ion_list('8..5')
# Scenario 6
def test_eq_classes(self):
expected = {'nion': 4, 'ion_list': [[4, 7], [5, 6]]}
res = self.cpars.parse_string_ion_list('[5, 8] [6 7]')
self.assertDictEqual(res, expected)
################################################################################
#
@ -136,7 +142,7 @@ class TestParseStringTmatrix(arraytest.ArrayTestCase):
err_mess = "Number of columns"
with self.assertRaisesRegexp(AssertionError, err_mess):
self.cpars.parse_string_tmatrix(par_str, real=True)
# Scenario 2
def test_complex_matrix_odd(self):
par_str = "1.0 0.0 2.0 1.0 0.0\n0.0 1.0 2.0 3.0 -1.0"