Skip to content

Commit 082a9c9

Browse files
Remove (incorrect) nose warnings from test_highlevel.py
Closes #2683
1 parent 4f0fc78 commit 082a9c9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

python/tests/test_highlevel.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4625,7 +4625,7 @@ class TestSeekDirection:
46254625
def ts(self):
46264626
return tsutil.all_trees_ts(3)
46274627

4628-
def setup(self):
4628+
def get_tree_pair(self):
46294629
ts = self.ts()
46304630
t1 = tskit.Tree(ts)
46314631
t2 = tskit.Tree(ts)
@@ -4638,7 +4638,7 @@ def setup(self):
46384638
def test_index_from_different_directions(self, index):
46394639
# Check that we get different orderings of the children arrays
46404640
# for all trees when we go in different directions.
4641-
t1, t2 = self.setup()
4641+
t1, t2 = self.get_tree_pair()
46424642
while t1.index != index:
46434643
t1.next()
46444644
while t2.index != index:
@@ -4647,7 +4647,7 @@ def test_index_from_different_directions(self, index):
46474647

46484648
@pytest.mark.parametrize("position", [0, 1, 2, 3])
46494649
def test_seek_from_null(self, position):
4650-
t1, t2 = self.setup()
4650+
t1, t2 = self.get_tree_pair()
46514651
t1.clear()
46524652
t1.seek(position)
46534653
t2.first()
@@ -4656,7 +4656,7 @@ def test_seek_from_null(self, position):
46564656

46574657
@pytest.mark.parametrize("index", range(3))
46584658
def test_seek_next_tree(self, index):
4659-
t1, t2 = self.setup()
4659+
t1, t2 = self.get_tree_pair()
46604660
while t1.index != index:
46614661
t1.next()
46624662
t2.next()
@@ -4666,7 +4666,7 @@ def test_seek_next_tree(self, index):
46664666

46674667
@pytest.mark.parametrize("index", [3, 2, 1])
46684668
def test_seek_prev_tree(self, index):
4669-
t1, t2 = self.setup()
4669+
t1, t2 = self.get_tree_pair()
46704670
while t1.index != index:
46714671
t1.prev()
46724672
t2.prev()
@@ -4675,52 +4675,52 @@ def test_seek_prev_tree(self, index):
46754675
assert_trees_identical(t1, t2)
46764676

46774677
def test_seek_1_from_0(self):
4678-
t1, t2 = self.setup()
4678+
t1, t2 = self.get_tree_pair()
46794679
t1.first()
46804680
t1.next()
46814681
t2.first()
46824682
t2.seek(1)
46834683
assert_trees_identical(t1, t2)
46844684

46854685
def test_seek_1_5_from_0(self):
4686-
t1, t2 = self.setup()
4686+
t1, t2 = self.get_tree_pair()
46874687
t1.first()
46884688
t1.next()
46894689
t2.first()
46904690
t2.seek(1.5)
46914691
assert_trees_identical(t1, t2)
46924692

46934693
def test_seek_1_5_from_1(self):
4694-
t1, t2 = self.setup()
4694+
t1, t2 = self.get_tree_pair()
46954695
for _ in range(2):
46964696
t1.next()
46974697
t2.next()
46984698
t2.seek(1.5)
46994699
assert_trees_identical(t1, t2)
47004700

47014701
def test_seek_3_from_null(self):
4702-
t1, t2 = self.setup()
4702+
t1, t2 = self.get_tree_pair()
47034703
t1.last()
47044704
t2.seek(3)
47054705
assert_trees_identical(t1, t2)
47064706

47074707
def test_seek_3_from_null_prev(self):
4708-
t1, t2 = self.setup()
4708+
t1, t2 = self.get_tree_pair()
47094709
t1.last()
47104710
t1.prev()
47114711
t2.seek(3)
47124712
t2.prev()
47134713
assert_trees_identical(t1, t2)
47144714

47154715
def test_seek_3_from_0(self):
4716-
t1, t2 = self.setup()
4716+
t1, t2 = self.get_tree_pair()
47174717
t1.last()
47184718
t2.first()
47194719
t2.seek(3)
47204720
assert_trees_identical(t1, t2)
47214721

47224722
def test_seek_0_from_3(self):
4723-
t1, t2 = self.setup()
4723+
t1, t2 = self.get_tree_pair()
47244724
t1.last()
47254725
t1.first()
47264726
t2.last()

0 commit comments

Comments
 (0)