@@ -220,6 +220,7 @@ def run(self):
220220 )
221221
222222 assert states == ["0" , "1" , "0" , "1" ]
223+ assert num_flexible == 1
223224
224225
225226def test_assign_states_for_group_sets_empty_lists_and_delegates_for_nonempty ():
@@ -252,6 +253,8 @@ def test_assign_states_for_group_sets_empty_lists_and_delegates_for_nonempty():
252253 assert states_ua [(1 , 0 )] == []
253254 assert states_ua [(1 , 1 )] == ["x" ]
254255 assert states_res [1 ] == []
256+ assert flexible_ua == {(1 , 0 ): 0 , (1 , 1 ): 0 }
257+ assert flexible_res == [None , 0 ]
255258 assert assign_spy .call_count == 1
256259
257260
@@ -280,6 +283,8 @@ def test_build_conformational_states_runs_group_and_skips_empty_group(monkeypatc
280283
281284 assert states_ua == {}
282285 assert len (states_res ) == 2
286+ assert flex_ua == {}
287+ assert flex_res == [0 , 0 ]
283288
284289
285290def test_identify_peaks_handles_multiple_dihedrals_and_calls_histogram_each_time ():
@@ -352,6 +357,7 @@ def run(self):
352357 )
353358
354359 assert out_state == []
360+ assert out_flex == 0
355361
356362
357363def test_identify_peaks_multiple_molecules_real_histogram ():
@@ -447,6 +453,7 @@ def test_assign_states_for_group_residue_nonempty_calls_assign_states():
447453 )
448454
449455 assert states_res [1 ] == ["A" ]
456+ assert flexible_res [1 ] == 0
450457 spy .assert_called_once ()
451458
452459
@@ -482,6 +489,7 @@ def run(self):
482489 )
483490
484491 assert states == ["0" ]
492+ assert num_flex == 0
485493
486494
487495def test_collect_peaks_for_group_calls_identify_peaks_for_ua_and_residue ():
@@ -542,6 +550,7 @@ def run(self):
542550 )
543551
544552 assert states == ["1" , "0" ]
553+ assert num_flex == 1
545554
546555
547556def test_build_conformational_states_with_progress_handles_no_groups ():
@@ -592,6 +601,8 @@ def test_build_conformational_states_with_progress_skips_empty_molecule_group():
592601
593602 assert states_ua == {}
594603 assert len (states_res ) == 1
604+ assert flex_ua == {}
605+ assert flex_res == [0 ]
595606 progress .update .assert_called_with (5 , title = "Group 0 (empty)" )
596607 progress .advance .assert_called_with (5 )
597608
0 commit comments