def test_check_collapsed_pairs_raises_no_error(): """Checks that check_collapsed_pairs raises no error if no collapsed pairs is present""" pairs_ok = np.array([[[0.1, 3.3], [3.3, 0.1]], [[0.1, 3.3], [3.3, 0.1]], [[2.5, 8.1], [0.1, 3.3]]]) check_collapsed_pairs(pairs_ok)
def test_check_collapsed_pairs_raises_no_error(): """Checks that check_collapsed_pairs raises no error if no collapsed pairs is present""" pairs_ok = np.array([[[0.1, 3.3], [3.3, 0.1]], [[0.1, 3.3], [3.3, 0.1]], [[2.5, 8.1], [0.1, 3.3]]]) check_collapsed_pairs(pairs_ok)
def test_check_collapsed_pairs_raises_error(): """Checks that check_collapsed_pairs raises no error if no collapsed pairs is present""" pairs_not_ok = np.array([[[0.1, 3.3], [0.1, 3.3]], [[0.1, 3.3], [3.3, 0.1]], [[2.5, 8.1], [2.5, 8.1]]]) with pytest.raises(ValueError) as e: check_collapsed_pairs(pairs_not_ok) assert str(e.value) == ("2 collapsed pairs found (where the left element is " "the same as the right element), out of 3 pairs in" " total.")
def test_check_collapsed_pairs_raises_error(): """Checks that check_collapsed_pairs raises no error if no collapsed pairs is present""" pairs_not_ok = np.array([[[0.1, 3.3], [0.1, 3.3]], [[0.1, 3.3], [3.3, 0.1]], [[2.5, 8.1], [2.5, 8.1]]]) with pytest.raises(ValueError) as e: check_collapsed_pairs(pairs_not_ok) assert str(e.value) == ("2 collapsed pairs found (where the left element is " "the same as the right element), out of 3 pairs in" " total.")