def test_slices_bigger_than_number(self): with self.assertRaises(ValueError): get_product("012", 4)
def test_identity(self): self.assertEqual(1, get_product("", 0))
def test_big_number(self): series = "52677741234314237566414902593461595376319419139427" self.assertEqual(28350, get_product(series, 6))
def test_largest_product_of_3(self): self.assertEqual(270, get_product("1027839564", 3))
def test_tiny_number(self): self.assertEqual(9, get_product("19", 2))
def test_largest_product_of_2(self): self.assertEqual(72, get_product("0123456789", 2))