@@ -161,12 +161,12 @@ class TestThermodynamicRelationships(unittest.TestCase):
161
161
different types of DNA structures and sequences.
162
162
'''
163
163
164
- def setUp (self ):
164
+ def setUp (self ) -> None :
165
165
self .conditions = STANDARD_CONDITIONS .copy ()
166
166
self .thermo = thermoanalysis .ThermoAnalysis ()
167
167
self .thermo .set_thermo_args (** self .conditions )
168
168
169
- def test_gc_content_effect (self ):
169
+ def test_gc_content_effect (self ) -> None :
170
170
'''Test that GC-rich sequences have higher melting temperatures than
171
171
AT-rich ones
172
172
'''
@@ -178,7 +178,7 @@ def test_gc_content_effect(self):
178
178
179
179
self .assertGreater (gc_tm , at_tm )
180
180
181
- def test_hairpin_stability (self ):
181
+ def test_hairpin_stability (self ) -> None :
182
182
'''Test that perfect hairpins are more stable than mismatched ones'''
183
183
perfect = TEST_SEQUENCES ['hairpins' ]['perfect' ]
184
184
mismatched = TEST_SEQUENCES ['hairpins' ]['mismatched' ]
@@ -188,7 +188,7 @@ def test_hairpin_stability(self):
188
188
189
189
self .assertLess (perfect_dg , mismatched_dg )
190
190
191
- def test_hairpin_stability_relationships (self ):
191
+ def test_hairpin_stability_relationships (self ) -> None :
192
192
'''Test that hairpin stabilities follow expected order: perfect <
193
193
mismatched < bulged.
194
194
'''
@@ -203,7 +203,7 @@ def test_hairpin_stability_relationships(self):
203
203
self .assertLess (perfect_dg , mismatched_dg )
204
204
self .assertLess (mismatched_dg , bulged_dg )
205
205
206
- def test_heterodimer_stability_relationships (self ):
206
+ def test_heterodimer_stability_relationships (self ) -> None :
207
207
'''Test that heterodimer stabilities follow expected order:
208
208
complementary < overlapping < mismatched.
209
209
'''
@@ -224,7 +224,7 @@ def test_heterodimer_stability_relationships(self):
224
224
self .assertLess (comp_dg , overlap_dg )
225
225
self .assertLess (overlap_dg , mismatch_dg )
226
226
227
- def test_end_stability_relationships (self ):
227
+ def test_end_stability_relationships (self ) -> None :
228
228
'''Test that end stability follows expected order: perfect < partial <
229
229
mismatched.
230
230
'''
@@ -245,7 +245,7 @@ def test_end_stability_relationships(self):
245
245
self .assertLess (perfect_dg , partial_dg )
246
246
self .assertLess (partial_dg , mismatched_dg )
247
247
248
- def test_parameter_effects (self ):
248
+ def test_parameter_effects (self ) -> None :
249
249
'''Test that changing parameters affects all sequences consistently'''
250
250
base_conditions = self .conditions .copy ()
251
251
high_salt_conditions = base_conditions .copy ()
@@ -270,36 +270,36 @@ class TestThermodynamicRegression(unittest.TestCase):
270
270
previously calculated across different types of DNA structures.
271
271
'''
272
272
273
- def setUp (self ):
273
+ def setUp (self ) -> None :
274
274
self .conditions = STANDARD_CONDITIONS .copy ()
275
275
self .thermo = thermoanalysis .ThermoAnalysis ()
276
276
self .thermo .set_thermo_args (** self .conditions )
277
277
self .standard_values = load_thermo_values ()['values' ]
278
278
279
- def assert_thermo_result_equal (self , result1 , result2 , places = 2 ):
279
+ def assert_thermo_result_equal (self , result1 , result2 , places = 2 ) -> None :
280
280
'''Assert that two thermodynamic results are approximately equal'''
281
281
for key , value in result1 .items ():
282
282
if isinstance (value , (int , float )):
283
283
self .assertAlmostEqual (value , result2 [key ], places = places )
284
284
elif isinstance (value , dict ):
285
285
self .assert_thermo_result_equal (value , result2 [key ], places )
286
286
287
- def test_hairpin_regression (self ):
287
+ def test_hairpin_regression (self ) -> None :
288
288
'''Test that hairpin calculations match standard values'''
289
289
for name , seq in TEST_SEQUENCES ['hairpins' ].items ():
290
290
result = self .thermo .calc_hairpin (seq ).todict ()
291
291
standard = self .standard_values ['hairpins' ][name ]['hairpin' ]
292
292
self .assert_thermo_result_equal (result , standard )
293
293
294
- def test_homodimer_regression (self ):
294
+ def test_homodimer_regression (self ) -> None :
295
295
'''Test that homodimer calculations match standard values'''
296
296
for category in ['homopolymers' , 'palindromes' , 'hairpins' ]:
297
297
for name , seq in TEST_SEQUENCES [category ].items ():
298
298
result = self .thermo .calc_homodimer (seq ).todict ()
299
299
standard = self .standard_values [category ][name ]['homodimer' ]
300
300
self .assert_thermo_result_equal (result , standard )
301
301
302
- def test_heterodimer_regression (self ):
302
+ def test_heterodimer_regression (self ) -> None :
303
303
'''Test that heterodimer calculations match standard values'''
304
304
for name , pair in TEST_SEQUENCES ['heterodimers' ].items ():
305
305
result = self .thermo .calc_heterodimer (
@@ -308,7 +308,7 @@ def test_heterodimer_regression(self):
308
308
standard = self .standard_values ['heterodimers' ][name ]['heterodimer' ]
309
309
self .assert_thermo_result_equal (result , standard )
310
310
311
- def test_end_stability_regression (self ):
311
+ def test_end_stability_regression (self ) -> None :
312
312
'''Test that end stability calculations match standard values'''
313
313
for name , pair in TEST_SEQUENCES ['end_stability' ].items ():
314
314
result = self .thermo .calc_end_stability (
0 commit comments