]> granicus.if.org Git - python/commitdiff
Use assertEqual(). (#13883)
authorStefan Krah <skrah@bytereef.org>
Fri, 7 Jun 2019 09:18:34 +0000 (11:18 +0200)
committerGitHub <noreply@github.com>
Fri, 7 Jun 2019 09:18:34 +0000 (11:18 +0200)
Lib/ctypes/test/test_arrays.py

index a3e6d76940e0a19d09d0efc91a7fccd40b162cee..14603b7049c92c59032e725c48557a1eaf864a51 100644 (file)
@@ -213,7 +213,7 @@ class ArrayTestCase(unittest.TestCase):
             _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):
@@ -221,7 +221,7 @@ class ArrayTestCase(unittest.TestCase):
             _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