def test_is_set(): """Test set validator (Exercise 3a).""" cards = numpy.array([[1, 1, 1, 2, 0], [0, 1, 2, 2, 2], [0, 1, 2, 2, 2], [0, 1, 2, 2, 2]]) assert set_solver.is_set(cards, [0, 1, 2]) assert not set_solver.is_set(cards, [0, 1, 3]) assert set_solver.is_set(cards, [2, 3, 4])
def test_is_set(self): """Test set validator (Exercise 3a).""" cards = numpy.array([[1, 1, 1, 2, 0], [0, 1, 2, 2, 2], [0, 1, 2, 2, 2], [0, 1, 2, 2, 2]]) self.assertTrue(set_solver.is_set(cards, [0, 1, 2])) self.assertFalse(set_solver.is_set(cards, [0, 1, 3])) self.assertTrue(set_solver.is_set(cards, [2, 3, 4]))
def test_is_set(): """Test set validator (Exercise 3a).""" cards = numpy.array([[1,1,1,2,0], [0,1,2,2,2], [0,1,2,2,2], [0,1,2,2,2]]) assert set_solver.is_set(cards, [0, 1, 2]) assert not set_solver.is_set(cards, [0, 1, 3]) assert set_solver.is_set(cards, [2, 3, 4])
def test_is_set(self): """Test set validator (Exercise 3a).""" cards = numpy.array([[1,1,1,2,0], [0,1,2,2,2], [0,1,2,2,2], [0,1,2,2,2]]) self.assertTrue(set_solver.is_set(cards, [0, 1, 2])) self.assertFalse(set_solver.is_set(cards, [0, 1, 3])) self.assertTrue(set_solver.is_set(cards, [2, 3, 4]))