Skip to content

Commit 3873bcb

Browse files
committed
assert_array_equals
1 parent 4a815ba commit 3873bcb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

python/tests/test_highlevel.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5507,7 +5507,7 @@ def test_basic_individual_nodes(self, tmp_path):
55075507

55085508
result = ts.individual_nodes
55095509
assert result.shape == (2, 2)
5510-
assert np.array_equal(result, [[0, 1], [2, 3]])
5510+
assert_array_equal(result, [[0, 1], [2, 3]])
55115511

55125512
def test_variable_ploidy(self, tmp_path):
55135513
tables = tskit.TableCollection(sequence_length=100)
@@ -5536,7 +5536,7 @@ def test_variable_ploidy(self, tmp_path):
55365536
expected = np.array(
55375537
[[0, 1, -1], [2, -1, -1], [3, 4, 5]] # Diploid # Haploid # Triploid
55385538
)
5539-
assert np.array_equal(result, expected)
5539+
assert_array_equal(result, expected)
55405540

55415541
def test_no_individuals(self):
55425542
tables = tskit.TableCollection(sequence_length=100)
@@ -5546,7 +5546,7 @@ def test_no_individuals(self):
55465546
result = ts.individual_nodes
55475547
expected = np.array([], dtype=np.int32).reshape(0, 0)
55485548
assert result.shape == (0, 0)
5549-
assert np.array_equal(result, expected)
5549+
assert_array_equal(result, expected)
55505550

55515551
def test_no_nodes_with_individuals(self):
55525552
tables = tskit.TableCollection(sequence_length=100)
@@ -5558,7 +5558,7 @@ def test_no_nodes_with_individuals(self):
55585558
result = ts.individual_nodes
55595559
expected = np.array([[]])
55605560
assert result.shape == (1, 0)
5561-
assert np.array_equal(result, expected)
5561+
assert_array_equal(result, expected)
55625562

55635563
def test_individual_with_no_nodes(self):
55645564
tables = tskit.TableCollection(sequence_length=100)
@@ -5571,7 +5571,7 @@ def test_individual_with_no_nodes(self):
55715571
result = ts.individual_nodes
55725572
expected = np.array([[0], [-1]])
55735573
assert result.shape == (2, 1)
5574-
assert np.array_equal(result, expected)
5574+
assert_array_equal(result, expected)
55755575

55765576
def test_mixed_sample_status(self):
55775577
tables = tskit.TableCollection(sequence_length=100)
@@ -5583,4 +5583,4 @@ def test_mixed_sample_status(self):
55835583
result = ts.individual_nodes
55845584
expected = np.array([[0, 1]])
55855585
assert result.shape == (1, 2)
5586-
assert np.array_equal(result, expected)
5586+
assert_array_equal(result, expected)

0 commit comments

Comments
 (0)