Skip to content

Commit

Permalink
expand auto charge balance test
Browse files Browse the repository at this point in the history
  • Loading branch information
rkingsbury committed Jul 27, 2024
1 parent 05cad1a commit 9679333
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ def test_charge_balance(s3, s5, s5_pH, s6, s6_Ca):
s.equilibrate()
assert s.balance_charge == "Na[+1]"

s = Solution({"Na+": "2 mM", "Cl-": "1 mM"}, balance_charge="auto")
assert s.balance_charge == "Cl[-1]"
assert np.isclose(s.charge_balance, 0, atol=1e-8)
s.equilibrate()
assert s.balance_charge == "Cl[-1]"


def test_alkalinity_hardness(s3, s5, s6):
assert np.isclose(s3.hardness, 0)
Expand Down

0 comments on commit 9679333

Please sign in to comment.