[Python-checkins] Use assertEqual(). (#13886)

Stefan Krah webhook-mailer at python.org
Fri Jun 7 05:47:22 EDT 2019


https://github.com/python/cpython/commit/4ea9dbda4ad823875ed79a25062a7f5415d91b22
commit: 4ea9dbda4ad823875ed79a25062a7f5415d91b22
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Stefan Krah <skrah at bytereef.org>
date: 2019-06-07T11:47:16+02:00
summary:

Use assertEqual(). (#13886)

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

diff --git a/Lib/ctypes/test/test_arrays.py b/Lib/ctypes/test/test_arrays.py
index 9e41f45dc9b1..63a00b9e3cdb 100644
--- a/Lib/ctypes/test/test_arrays.py
+++ b/Lib/ctypes/test/test_arrays.py
@@ -199,7 +199,7 @@ class EmptyStruct(Structure):
             _fields_ = []
 
         obj = (EmptyStruct * 2)()  # bpo37188: Floating point exception
-        assert sizeof(obj) == 0
+        self.assertEqual(sizeof(obj), 0)
 
     def test_empty_element_array(self):
         class EmptyArray(Array):
@@ -207,7 +207,7 @@ class EmptyArray(Array):
             _length_ = 0
 
         obj = (EmptyArray * 2)()  # bpo37188: Floating point exception
-        assert sizeof(obj) == 0
+        self.assertEqual(sizeof(obj), 0)
 
     def test_bpo36504_signed_int_overflow(self):
         # The overflow check in PyCArrayType_new() could cause signed integer



More information about the Python-checkins mailing list