diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-07-20 12:53:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-20 12:53:55 (GMT) |
commit | 12f433411bba8a0cdc4f09ba34472745ae9da0d1 (patch) | |
tree | e927f56adec372fd015906082e1a9e27152ba421 /Lib/test/test_grammar.py | |
parent | e123012d79121ab543583631bb84c7fc27d06338 (diff) | |
download | cpython-12f433411bba8a0cdc4f09ba34472745ae9da0d1.zip cpython-12f433411bba8a0cdc4f09ba34472745ae9da0d1.tar.gz cpython-12f433411bba8a0cdc4f09ba34472745ae9da0d1.tar.bz2 |
bpo-41334: Convert constructors of str, bytes and bytearray to Argument Clinic (GH-21535)
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r-- | Lib/test/test_grammar.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index a51452e..5235fa2 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -584,12 +584,14 @@ class GrammarTests(unittest.TestCase): d22v(1, *(2, 3), **{'d': 4}) # keyword argument type tests - try: - str('x', **{b'foo':1 }) - except TypeError: - pass - else: - self.fail('Bytes should not work as keyword argument names') + with warnings.catch_warnings(): + warnings.simplefilter('ignore', BytesWarning) + try: + str('x', **{b'foo':1 }) + except TypeError: + pass + else: + self.fail('Bytes should not work as keyword argument names') # keyword only argument tests def pos0key1(*, key): return key pos0key1(key=100) |