diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-02 18:59:44 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-02 18:59:44 (GMT) |
commit | 0a6ef790e456ac4eb1d2bda7d31df99e3b5f2472 (patch) | |
tree | b4296e0b6a1be20b2b76622f52fa3eedec092db5 /Lib/test/test_unicode.py | |
parent | b3648576cd76232e618ecc227541c7b722355f6e (diff) | |
download | cpython-0a6ef790e456ac4eb1d2bda7d31df99e3b5f2472.zip cpython-0a6ef790e456ac4eb1d2bda7d31df99e3b5f2472.tar.gz cpython-0a6ef790e456ac4eb1d2bda7d31df99e3b5f2472.tar.bz2 |
test_invalid_sequences seems don't have to stay in CAPITest.
Reported by Xiang Zhang.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r-- | Lib/test/test_unicode.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index c98cc14..432a001 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -2413,6 +2413,13 @@ class UnicodeTest(string_tests.CommonTest, 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 CAPITest(unittest.TestCase): @@ -2773,13 +2780,6 @@ 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_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): def parse(format): |