From: Serhiy Storchaka Date: Sun, 2 Oct 2016 18:18:14 +0000 (+0300) Subject: Moved Unicode C API related tests to separate test class. X-Git-Tag: v3.6.0b2~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1edebef724012a4dff48ec3eb2b41981b1610fdd;p=thirdparty%2FPython%2Fcpython.git Moved Unicode C API related tests to separate test class. --- 1edebef724012a4dff48ec3eb2b41981b1610fdd diff --cc Lib/test/test_unicode.py index 2684b940ef5c,082f6b59da36..9cb69d486212 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@@ -2749,16 -2732,6 +2756,12 @@@ class CAPITest(unittest.TestCase) # 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):