Skip to content

Commit 4e61a59

Browse files
sobolevnvstinner
authored andcommitted
pythongh-108303: Move all math files to Lib/test/mathdata/ (python#109512)
(cherry picked from commit ed587be)
1 parent 4a0c118 commit 4e61a59

File tree

8 files changed

+6
-4
lines changed

8 files changed

+6
-4
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Lib/test/test_float.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#locate file with float format test values
2727
test_dir = os.path.dirname(__file__) or os.curdir
28-
format_testfile = os.path.join(test_dir, 'formatfloat_testcases.txt')
28+
format_testfile = os.path.join(test_dir, 'mathdata', 'formatfloat_testcases.txt')
2929

3030
class FloatSubclass(float):
3131
pass
@@ -763,6 +763,7 @@ def test_issue35560(self):
763763
class ReprTestCase(unittest.TestCase):
764764
def test_repr(self):
765765
with open(os.path.join(os.path.split(__file__)[0],
766+
'mathdata',
766767
'floating_points.txt'), encoding="utf-8") as floats_file:
767768
for line in floats_file:
768769
line = line.strip()

Lib/test/test_math.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
else:
3434
file = __file__
3535
test_dir = os.path.dirname(file) or os.curdir
36-
math_testcases = os.path.join(test_dir, 'math_testcases.txt')
37-
test_file = os.path.join(test_dir, 'cmath_testcases.txt')
36+
math_testcases = os.path.join(test_dir, 'mathdata', 'math_testcases.txt')
37+
test_file = os.path.join(test_dir, 'mathdata', 'cmath_testcases.txt')
3838

3939

4040
def to_ulps(x):
@@ -2518,7 +2518,7 @@ def test_fractions(self):
25182518

25192519
def load_tests(loader, tests, pattern):
25202520
from doctest import DocFileSuite
2521-
tests.addTest(DocFileSuite("ieee754.txt"))
2521+
tests.addTest(DocFileSuite(os.path.join("mathdata", "ieee754.txt")))
25222522
return tests
25232523

25242524
if __name__ == '__main__':

Makefile.pre.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,6 +2126,7 @@ TESTSUBDIRS= idlelib/idle_test \
21262126
test/imghdrdata \
21272127
test/leakers \
21282128
test/libregrtest \
2129+
test/mathdata \
21292130
test/sndhdrdata \
21302131
test/subprocessdata \
21312132
test/support \

0 commit comments

Comments
 (0)