summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2021-01-23 16:34:01 (GMT)
committerGitHub <noreply@github.com>2021-01-23 16:34:01 (GMT)
commitf7fa64f0e87edc61d990ed51b4da722906a10928 (patch)
treeae89e20fabd558f7f0747ba32c747cb97c23b207
parentb745a6143ae79efe00aa46affe5ea31a06b0b532 (diff)
downloadcpython-f7fa64f0e87edc61d990ed51b4da722906a10928.zip
cpython-f7fa64f0e87edc61d990ed51b4da722906a10928.tar.gz
cpython-f7fa64f0e87edc61d990ed51b4da722906a10928.tar.bz2
closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305)
-rw-r--r--Lib/ctypes/test/test_parameters.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/ctypes/test/test_parameters.py
index 531894f..38af7ac 100644
--- a/Lib/ctypes/test/test_parameters.py
+++ b/Lib/ctypes/test/test_parameters.py
@@ -240,8 +240,8 @@ class SimpleTypesTestCase(unittest.TestCase):
self.assertEqual(repr(c_double.from_param(1.5)), "<cparam 'd' (1.5)>")
self.assertEqual(repr(c_double.from_param(1e300)), "<cparam 'd' (1e+300)>")
self.assertRegex(repr(c_longdouble.from_param(1.5)), r"^<cparam ('d' \(1.5\)|'g' at 0x[A-Fa-f0-9]+)>$")
- self.assertRegex(repr(c_char_p.from_param(b'hihi')), "^<cparam 'z' \(0x[A-Fa-f0-9]+\)>$")
- self.assertRegex(repr(c_wchar_p.from_param('hihi')), "^<cparam 'Z' \(0x[A-Fa-f0-9]+\)>$")
+ self.assertRegex(repr(c_char_p.from_param(b'hihi')), r"^<cparam 'z' \(0x[A-Fa-f0-9]+\)>$")
+ self.assertRegex(repr(c_wchar_p.from_param('hihi')), r"^<cparam 'Z' \(0x[A-Fa-f0-9]+\)>$")
self.assertRegex(repr(c_void_p.from_param(0x12)), r"^<cparam 'P' \(0x0*12\)>$")
################################################################