mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-30721: Add missing '?' to new error message (GH-3131)
This commit is contained in:
parent
f0202bb349
commit
a7c449b8c0
2 changed files with 3 additions and 3 deletions
|
@ -161,14 +161,14 @@ class TestPy2MigrationHint(unittest.TestCase):
|
|||
with self.assertRaises(TypeError) as context:
|
||||
print >> sys.stderr, "message"
|
||||
self.assertIn('Did you mean "print(<message>, '
|
||||
'file=<output_stream>)', str(context.exception))
|
||||
'file=<output_stream>)"?', str(context.exception))
|
||||
|
||||
# Test correct hint is produced in the case where RHS implements
|
||||
# __rrshift__ but returns NotImplemented
|
||||
with self.assertRaises(TypeError) as context:
|
||||
print >> 42
|
||||
self.assertIn('Did you mean "print(<message>, '
|
||||
'file=<output_stream>)', str(context.exception))
|
||||
'file=<output_stream>)"?', str(context.exception))
|
||||
|
||||
# Test stream redirection hint is specific to print
|
||||
with self.assertRaises(TypeError) as context:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue