def test_four_objects(self): actual = phdlib.triple_indices(4) actual = set(frozenset(triple) for triple in actual) expected = { frozenset((0, 1, 2)), frozenset((0, 1, 3)), frozenset((0, 2, 3)), frozenset((1, 2, 3)) } self.assertEqual(actual, expected)
def test_three_objects(self): actual = phdlib.triple_indices(3) actual = set(actual[0]) expected = set([0, 1, 2]) self.assertEqual(actual, expected)
def test_returns_ndarray_of_ints(self): result = phdlib.triple_indices(3) self.assertIsInstance(result, np.ndarray) self.assertTrue(np.issubdtype(result.dtype, np.integer))