# Check that the second call returns the same result
self.assertEqual(getargs_s_hash(s), chr(k).encode() * (i + 1))
- def test_free_after_iterating(self):
- support.check_free_after_iterating(self, iter, str)
- support.check_free_after_iterating(self, reversed, str)
-
+ def test_invalid_sequences(self):
+ for letter in string.ascii_letters + "89": # 0-7 are octal escapes
+ if letter in "abfnrtuvxNU":
+ continue
+ with self.assertWarns(DeprecationWarning):
+ eval(r"'\%s'" % letter)
class StringModuleTest(unittest.TestCase):
def test_formatter_parser(self):