Skip to content

Commit

Permalink
address review: split test_misc()
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Aug 9, 2024
1 parent ab08430 commit 0bccf1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/test/test_capi/test_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def test_binary_ops(self):
# CRASHES func(NULL, object())
# CRASHES func(object(), NULL)

def test_misc(self):
def test_misc_add(self):
# PyNumber_Add(), PyNumber_InPlaceAdd()
add = _testcapi.number_add
inplaceadd = _testcapi.number_inplaceadd
Expand All @@ -179,6 +179,7 @@ def test_misc(self):
self.assertEqual(a, r)
self.assertRaises(TypeError, inplaceadd, ndarray([1], (1,)), 2)

def test_misc_multiply(self)
# PyNumber_Multiply(), PyNumber_InPlaceMultiply()
multiply = _testcapi.number_multiply
inplacemultiply = _testcapi.number_inplacemultiply
Expand All @@ -204,6 +205,7 @@ def test_misc(self):
self.assertRaises(OverflowError, inplacemultiply, [1], PY_SSIZE_T_MAX + 1)
self.assertRaises(MemoryError, inplacemultiply, [1, 2], PY_SSIZE_T_MAX//2 + 1)

def test_misc_power(self):
# PyNumber_Power()
power = _testcapi.number_power

Expand Down

0 comments on commit 0bccf1c

Please sign in to comment.