[Python-checkins] bpo-19113: Remove unused test_errors from ctypes tests (GH-28008)

ambv webhook-mailer at python.org
Wed Sep 8 11:28:42 EDT 2021


https://github.com/python/cpython/commit/a5610057615779ca6fc75d9e006d2fae644a94d3
commit: a5610057615779ca6fc75d9e006d2fae644a94d3
branch: main
author: andrei kulakov <andrei.avk at gmail.com>
committer: ambv <lukasz at langa.pl>
date: 2021-09-08T17:28:32+02:00
summary:

bpo-19113: Remove unused test_errors from ctypes tests (GH-28008)

This test was forever shadowed by another test method named `test_errors`.

files:
M Lib/ctypes/test/test_functions.py

diff --git a/Lib/ctypes/test/test_functions.py b/Lib/ctypes/test/test_functions.py
index d3c6536f2766a..c5456ba107ae3 100644
--- a/Lib/ctypes/test/test_functions.py
+++ b/Lib/ctypes/test/test_functions.py
@@ -209,15 +209,6 @@ def test_pointers(self):
         result = f(byref(c_int(99)))
         self.assertNotEqual(result.contents, 99)
 
-    def test_errors(self):
-        f = dll._testfunc_p_p
-        f.restype = c_int
-
-        class X(Structure):
-            _fields_ = [("y", c_int)]
-
-        self.assertRaises(TypeError, f, X()) #cannot convert parameter
-
     ################################################################
     def test_shorts(self):
         f = dll._testfunc_callback_i_if



More information about the Python-checkins mailing list