@support.bigaddrspacetest
def test_permutations_overflow(self):
- with self.assertRaises(OverflowError):
+ with self.assertRaises((OverflowError, MemoryError)):
permutations("A", 2**30)
- with self.assertRaises(OverflowError):
- permutations("A", 2, 2**30)
- @support.impl_detail("tuple resuse is CPython specific")
+ @support.impl_detail("tuple reuse is specific to CPython")
def test_permutations_tuple_reuse(self):
self.assertEqual(len(set(map(id, permutations('abcde', 3)))), 1)
self.assertNotEqual(len(set(map(id, list(permutations('abcde', 3))))), 1)