Skip to content

Commit ed587be

Browse files
authored
gh-108303: Move all math files to Lib/test/mathdata/ (#109512)
1 parent 1163678 commit ed587be

8 files changed

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

Lib/test/test_float.py

+2-1
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
@@ -768,6 +768,7 @@ def test_issue35560(self):
768768
class ReprTestCase(unittest.TestCase):
769769
def test_repr(self):
770770
with open(os.path.join(os.path.split(__file__)[0],
771+
'mathdata',
771772
'floating_points.txt'), encoding="utf-8") as floats_file:
772773
for line in floats_file:
773774
line = line.strip()

Lib/test/test_math.py

+3-3
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):
@@ -2559,7 +2559,7 @@ def test_fractions(self):
25592559

25602560
def load_tests(loader, tests, pattern):
25612561
from doctest import DocFileSuite
2562-
tests.addTest(DocFileSuite("ieee754.txt"))
2562+
tests.addTest(DocFileSuite(os.path.join("mathdata", "ieee754.txt")))
25632563
return tests
25642564

25652565
if __name__ == '__main__':

Makefile.pre.in

+1
Original file line numberDiff line numberDiff line change
@@ -2157,6 +2157,7 @@ TESTSUBDIRS= idlelib/idle_test \
21572157
test/encoded_modules \
21582158
test/leakers \
21592159
test/libregrtest \
2160+
test/mathdata \
21602161
test/subprocessdata \
21612162
test/support \
21622163
test/support/_hypothesis_stubs \

0 commit comments

Comments
 (0)