@@ -594,7 +594,8 @@ def test_activate_ghost_split(self):
594594 assert "B" == dbg .epochs [0 ].active_populations [0 ].name
595595 assert len (dbg .epochs [1 ].active_populations ) == 2
596596 active_pops = [_ .name for _ in dbg .epochs [1 ].active_populations ]
597- assert "B" in active_pops and "C" in active_pops
597+ assert "B" in active_pops
598+ assert "C" in active_pops
598599 assert len (dbg .epochs [2 ].active_populations ) == 1
599600 assert "A" in dbg .epochs [2 ].active_populations [0 ].name
600601
@@ -628,10 +629,12 @@ def test_activate_ghost_admixture(self):
628629 assert "D" == dbg .epochs [0 ].active_populations [0 ].name
629630 assert len (dbg .epochs [1 ].active_populations ) == 2
630631 active_pops = [_ .name for _ in dbg .epochs [1 ].active_populations ]
631- assert "B" in active_pops and "D" in active_pops
632+ assert "B" in active_pops
633+ assert "D" in active_pops
632634 assert len (dbg .epochs [2 ].active_populations ) == 2
633635 active_pops = [_ .name for _ in dbg .epochs [2 ].active_populations ]
634- assert "B" in active_pops and "C" in active_pops
636+ assert "B" in active_pops
637+ assert "C" in active_pops
635638 assert len (dbg .epochs [3 ].active_populations ) == 1
636639 assert "A" in dbg .epochs [3 ].active_populations [0 ].name
637640
@@ -775,7 +778,7 @@ def test_admixture_via_mass_migration(self):
775778 assert epoch .end_size == 1000
776779
777780 @pytest .mark .parametrize (
778- "time_lo, time_hi" , [(0 , math .inf ), (0 , 20 ), (10 , math .inf ), (10 , 20 )]
781+ ( "time_lo" , " time_hi") , [(0 , math .inf ), (0 , 20 ), (10 , math .inf ), (10 , 20 )]
779782 )
780783 def test_asymmetric_migration_via_rate_change (self , time_lo , time_hi ):
781784 demog = msprime .Demography .isolated_model ([1000 ] * 2 )
@@ -928,8 +931,8 @@ def test_bad_pulse(self):
928931 demog .to_demes ()
929932
930933 @pytest .mark .parametrize (
931- "sizes, times" ,
932- (( [1000 ], [0 ]), ([1000 , 500 ], [0 , 20 ]), ([1000 , 50 , 1000 ], [0 , 20 , 30 ])) ,
934+ ( "sizes" , " times") ,
935+ [( [1000 ], [0 ]), ([1000 , 500 ], [0 , 20 ]), ([1000 , 50 , 1000 ], [0 , 20 , 30 ])] ,
933936 )
934937 def test_piecewise_constant_sizes (self , sizes , times ):
935938 assert len (sizes ) == len (times )
@@ -953,13 +956,13 @@ def test_piecewise_constant_sizes(self, sizes, times):
953956 assert epochs [j ].end_time == times [len (times ) - j - 1 ]
954957
955958 @pytest .mark .parametrize (
956- "sizes, growth_rates, times" ,
957- (
959+ ( "sizes" , " growth_rates" , " times") ,
960+ [
958961 ([1000 , 500 ], [0.1 , 0 ], [0 , 20 ]),
959962 ([1000 , None , 1000 ], [0.1 , - 0.1 , 0 ], [0 , 20 , 30 ]),
960963 ([1000 , 5000 , 1000 ], [0.1 , None , 0 ], [0 , 20 , 30 ]),
961964 ([1000 , 5000 , None ], [0.1 , None , 0 ], [0 , 20 , 30 ]),
962- ) ,
965+ ] ,
963966 )
964967 def test_piecewise_exponential_sizes (self , sizes , growth_rates , times ):
965968 assert growth_rates [- 1 ] == 0 # can't convert to demes graph otherwise
0 commit comments