Skip to content

Commit 0d74e86

Browse files
author
Uli Köhler
committed
Fix docstring linting errors (D415) in test files
1 parent 182be6c commit 0d74e86

22 files changed

Lines changed: 45 additions & 45 deletions

tests/Chemistry/TestDebyeHuckel.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_debye_huckel_limiting_law_scalar(self):
2020
self.assertIsInstance(log_gamma, float)
2121

2222
def test_debye_huckel_limiting_law_array(self):
23-
"""Test Debye-Hückel limiting law with array input"""
23+
"""Test Debye-Hückel limiting law with array input."""
2424
I = np.array([0.001, 0.01, 0.1])
2525
log_gamma = debye_huckel_limiting_law(z_plus=1, z_minus=1, I=I)
2626
self.assertEqual(len(log_gamma), 3)
@@ -58,7 +58,7 @@ def test_consistency_limiting_law(self):
5858
self.assertAlmostEqual(gamma, 10.0 ** log_gamma, places=10)
5959

6060
def test_consistency_extended(self):
61-
"""Test consistency between log and linear forms for extended equation"""
61+
"""Test consistency between log and linear forms for extended equation."""
6262
z = 1
6363
I = 0.1
6464
a = 0.3
@@ -73,7 +73,7 @@ def test_debye_length_scalar(self):
7373
self.assertGreater(length, 0)
7474

7575
def test_debye_length_array(self):
76-
"""Test Debye length with array input"""
76+
"""Test Debye length with array input."""
7777
I = np.array([0.01, 0.1, 1.0])
7878
length = debye_length(I=I)
7979
self.assertEqual(len(length), 3)

tests/Chemistry/TestDiffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_fick_semi_infinite_concentration_scalar(self):
4040
self.assertIsInstance(conc, float)
4141

4242
def test_fick_thin_film_concentration_scalar(self):
43-
"""Test thin film concentration with scalar input"""
43+
"""Test thin film concentration with scalar input."""
4444
conc = fick_thin_film_concentration(M=1.0, D=1e-9, t=3600.0, x=0.001)
4545
self.assertIsInstance(conc, float)
4646

@@ -51,7 +51,7 @@ def test_diffusion_coefficient_from_temperature_scalar(self):
5151
self.assertGreater(D, 0)
5252

5353
def test_inverse_diffusion_distance_time(self):
54-
"""Test inverse relationship between distance and time"""
54+
"""Test inverse relationship between distance and time."""
5555
D = 1e-9
5656
t = 3600.0
5757
x = fick_diffusion_distance(D, t)

tests/Chemistry/TestElectrolyteConductivity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def test_normalize_cell_constant_various_units(self):
137137
self.assertAlmostEqual(result, expected)
138138

139139
def test_electrolyte_functions_various_units(self):
140-
"""Test electrolyte conductivity functions with various unit inputs"""
140+
"""Test electrolyte conductivity functions with various unit inputs."""
141141
# Test with different concentration units
142142
k1 = electrolyte_conductivity_from_molar("100 S·cm²/mol", "0.1 M")
143143
k2 = electrolyte_conductivity_from_molar("100 S·cm²/mol", "100 mM")

tests/Chemistry/TestHenderson.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_henderson_hasselbalch_ratio_scalar(self):
2727
self.assertAlmostEqual(ratio, 1.0, places=6)
2828

2929
def test_henderson_hasselbalch_pKa_scalar(self):
30-
"""Test Henderson-Hasselbalch pKa calculation with scalar input"""
30+
"""Test Henderson-Hasselbalch pKa calculation with scalar input."""
3131
pKa = henderson_hasselbalch_pKa(pH=4.75, base_concentration=0.1, acid_concentration=0.1)
3232
self.assertIsInstance(pKa, float)
3333
self.assertAlmostEqual(pKa, 4.75, places=6)

tests/Chemistry/TestIonExchange.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_normalize_mass_various_units(self):
100100
self.assertAlmostEqual(result, expected)
101101

102102
def test_ion_exchange_functions_various_units(self):
103-
"""Test ion exchange functions with various unit inputs"""
103+
"""Test ion exchange functions with various unit inputs."""
104104
# Test with different concentration units
105105
K1 = selectivity_coefficient("0.1 M", "0.1 M", "0.05 M", "0.1 M")
106106
K2 = selectivity_coefficient("100 mM", "100 mM", "50 mM", "100 mM")

tests/Chemistry/TestKohlrausch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_limiting_molar_conductivities_dict(self):
4545
self.assertIn("Cl-", LIMITING_MOLAR_CONDUCTIVITIES)
4646

4747
def test_inverse_kohlrausch_equation(self):
48-
"""Test inverse relationship between molar conductivity functions"""
48+
"""Test inverse relationship between molar conductivity functions."""
4949
Lambda_0 = 126.45
5050
c = 0.1
5151
K = 10.0

tests/Chemistry/TestLangmuir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_langmuir_coverage_scalar(self):
2424
self.assertLess(theta, 1)
2525

2626
def test_langmuir_adsorbed_amount_scalar(self):
27-
"""Test Langmuir adsorbed amount with scalar input"""
27+
"""Test Langmuir adsorbed amount with scalar input."""
2828
q = langmuir_adsorbed_amount(q_max=1.0, K=1.0, C=0.5)
2929
self.assertIsInstance(q, float)
3030
self.assertGreater(q, 0)

tests/Chemistry/TestNernstPlanck.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515

1616
class TestNernstPlanck(unittest.TestCase):
1717
def test_nernst_planck_flux_scalar(self):
18-
"""Test Nernst-Planck flux with scalar input"""
18+
"""Test Nernst-Planck flux with scalar input."""
1919
J = nernst_planck_flux(D=1e-9, dC_dx=1.0, z=1, C=1.0, dPhi_dx=1000.0)
2020
self.assertIsInstance(J, float)
2121

2222
def test_nernst_planck_diffusion_flux_scalar(self):
23-
"""Test Nernst-Planck diffusion flux with scalar input"""
23+
"""Test Nernst-Planck diffusion flux with scalar input."""
2424
J = nernst_planck_diffusion_flux(D=1e-9, dC_dx=1.0)
2525
self.assertIsInstance(J, float)
2626
self.assertLess(J, 0)
@@ -37,13 +37,13 @@ def test_einstein_relation_diffusion_mobility_scalar(self):
3737
self.assertGreater(D, 0)
3838

3939
def test_ionic_mobility_from_diffusion_scalar(self):
40-
"""Test ionic mobility from diffusion with scalar input"""
40+
"""Test ionic mobility from diffusion with scalar input."""
4141
u = ionic_mobility_from_diffusion(D=1e-9, z=1)
4242
self.assertIsInstance(u, float)
4343
self.assertGreater(u, 0)
4444

4545
def test_inverse_einstein_relation(self):
46-
"""Test inverse relationship between Einstein relation functions"""
46+
"""Test inverse relationship between Einstein relation functions."""
4747
D_orig = 1e-9
4848
u = ionic_mobility_from_diffusion(D_orig, 1)
4949
D_back = einstein_relation_diffusion_mobility(u)

tests/Chemistry/TestPREN.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_pren_basic(self):
1616
self.assertAlmostEqual(result, expected, places=6)
1717

1818
def test_pren_zero_molybdenum(self):
19-
"""Test PREN with zero molybdenum"""
19+
"""Test PREN with zero molybdenum."""
2020
result = pren(Cr=18.0, Mo=0.0, N=0.05)
2121
expected = 18.0 + 16.0 * 0.05
2222
self.assertAlmostEqual(result, expected, places=6)

tests/Chemistry/TestPitzer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_pitzer_B_gamma_scalar(self):
2525
self.assertIsInstance(result, float)
2626

2727
def test_pitzer_C_gamma_scalar(self):
28-
"""Test Pitzer C^γ with scalar input"""
28+
"""Test Pitzer C^γ with scalar input."""
2929
result = pitzer_C_gamma(C_phi=0.00127)
3030
self.assertIsInstance(result, float)
3131
self.assertAlmostEqual(result, 1.5 * 0.00127, places=6)
@@ -53,7 +53,7 @@ def test_pitzer_parameters_dict(self):
5353
self.assertIn("KCl", PITZER_PARAMETERS)
5454

5555
def test_pitzer_activity_coefficient_with_parameters(self):
56-
"""Test activity coefficient using common electrolyte parameters"""
56+
"""Test activity coefficient using common electrolyte parameters."""
5757
beta0, beta1, C_phi = PITZER_PARAMETERS["NaCl"]
5858
gamma = pitzer_activity_coefficient(m=1.0, z_plus=1, z_minus=1, nu_plus=1, nu_minus=1,
5959
beta0=beta0, beta1=beta1, C_phi=C_phi)
@@ -67,7 +67,7 @@ def test_type_annotations_exist(self):
6767
self.assertIsNotNone(MolalityMolKg)
6868

6969
def test_normalize_molality_various_units(self):
70-
"""Test normalize_molality with various unit inputs"""
70+
"""Test normalize_molality with various unit inputs."""
7171
test_cases = [
7272
("1 mol/kg", 1.0),
7373
("1 m", 1.0),

0 commit comments

Comments
 (0)