Skip to content

Commit ac1edc3

Browse files
committed
Update test_math.py from CPython v3.12.0a0
This update does not include `math.exp2` unrelated changes
1 parent 1933e5f commit ac1edc3

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Lib/test/test_math.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Python test set -- math module
22
# XXXX Should not do tests around zero only
33

4-
from test.support import run_unittest, verbose, requires_IEEE_754
4+
from test.support import verbose, requires_IEEE_754
55
from test import support
66
import unittest
77
import itertools
@@ -2230,13 +2230,10 @@ def test_fractions(self):
22302230
self.assertAllNotClose(fraction_examples, rel_tol=1e-9)
22312231

22322232

2233-
def test_main():
2234-
# from doctest import DocFileSuite
2235-
suite = unittest.TestSuite()
2236-
suite.addTest(unittest.makeSuite(MathTests))
2237-
suite.addTest(unittest.makeSuite(IsCloseTests))
2238-
# suite.addTest(DocFileSuite("ieee754.txt"))
2239-
run_unittest(suite)
2233+
def load_tests(loader, tests, pattern):
2234+
from doctest import DocFileSuite
2235+
tests.addTest(DocFileSuite("ieee754.txt"))
2236+
return tests
22402237

22412238
if __name__ == '__main__':
2242-
test_main()
2239+
unittest.main()

0 commit comments

Comments
 (0)