Skip to content

Commit

Permalink
refactor: improve code formatting and readability in test files
Browse files Browse the repository at this point in the history
  • Loading branch information
Anselmoo committed Jan 11, 2025
1 parent 162217b commit b104d04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions tanabesugano/test/test_matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()

Expand Down
5 changes: 4 additions & 1 deletion tanabesugano/test/test_num.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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

Expand Down

0 comments on commit b104d04

Please sign in to comment.