]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111495: Remove test_capi test_rshift_print() (#123338)
authorVictor Stinner <vstinner@python.org>
Mon, 26 Aug 2024 14:39:32 +0000 (16:39 +0200)
committerGitHub <noreply@github.com>
Mon, 26 Aug 2024 14:39:32 +0000 (14:39 +0000)
The suggestion for "print >> value" was removed recently:
commit 9375b9ca3a4998678ba74ff5c77ed540a4dcf887.

Lib/test/test_capi/test_number.py

index 3c1f0f248c37cbe04c8d26f6cc51cedd20af55fc..04f85d2395083a1dbf0f4c0b82687d464eb77ca9 100644 (file)
@@ -217,21 +217,6 @@ class CAPITest(unittest.TestCase):
         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