From b104d0408c92cc315c88e0f1dd57ff6e4f12ac79 Mon Sep 17 00:00:00 2001 From: Anselm Hahn Date: Sat, 11 Jan 2025 04:45:29 +0100 Subject: [PATCH] refactor: improve code formatting and readability in test files --- tanabesugano/test/test_matrices.py | 8 ++++++-- tanabesugano/test/test_num.py | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tanabesugano/test/test_matrices.py b/tanabesugano/test/test_matrices.py index 3106f35..790ee31 100644 --- a/tanabesugano/test/test_matrices.py +++ b/tanabesugano/test/test_matrices.py @@ -57,7 +57,10 @@ def test_eigensolver(ligand_field_theory, matrix, expected_eigenvalues): ids=["simple_2x2", "complex_3x3", "zero_2x2"], ) def test_construct_matrix( - ligand_field_theory, diag_elements, off_diag_elements, expected_matrix, + ligand_field_theory, + diag_elements, + off_diag_elements, + expected_matrix, ): # Act matrix = ligand_field_theory.construct_matrix(diag_elements, off_diag_elements) @@ -69,7 +72,8 @@ def test_construct_matrix( def test_solver_not_implemented(ligand_field_theory): # Act & Assert with pytest.raises( - NotImplementedError, match="Subclasses should implement this method.", + NotImplementedError, + match="Subclasses should implement this method.", ): ligand_field_theory.solver() diff --git a/tanabesugano/test/test_num.py b/tanabesugano/test/test_num.py index f628d89..8e076fc 100644 --- a/tanabesugano/test/test_num.py +++ b/tanabesugano/test/test_num.py @@ -6,7 +6,7 @@ from tanabesugano import matrices -def state_check(x) -> int: +def state_check(x) -> int:" for i in np.linspace(0, 1500, 30): if x == 2: states = matrices.d2(Dq=i).solver() @@ -29,10 +29,13 @@ def state_check(x) -> int: if x == 8: states = matrices.d8(Dq=i).solver() return len(states) + return None + def test_answer_d2() -> None: assert state_check(2) == 7 + def test_answer_d3() -> None: assert state_check(3) == 8