Skip to content

Commit

Permalink
pythongh-111495: Remove test_capi test_rshift_print() (python#123338)
Browse files Browse the repository at this point in the history
The suggestion for "print >> value" was removed recently:
commit 9375b9c.
  • Loading branch information
vstinner authored Aug 26, 2024
1 parent 2f20f5a commit a1ddaae
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Lib/test/test_capi/test_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,21 +217,6 @@ class HasPow(WithDunder):
self.assertRaises(TypeError, power, 4, 11, HasPow.with_val(NotImplemented))
self.assertRaises(TypeError, power, 4, 11, object())

@cpython_only
def test_rshift_print(self):
# This tests correct syntax hint for py2 redirection (>>).
rshift = _testcapi.number_rshift

with self.assertRaises(TypeError) as context:
rshift(print, 42)
self.assertIn('Did you mean "print(<message>, '
'file=<output_stream>)"?', str(context.exception))
with self.assertRaises(TypeError) as context:
rshift(max, sys.stderr)
self.assertNotIn('Did you mean ', str(context.exception))
with self.assertRaises(TypeError) as context:
rshift(1, "spam")

def test_long(self):
# Test PyNumber_Long()
long = _testcapi.number_long
Expand Down

0 comments on commit a1ddaae

Please sign in to comment.