diff --git a/Lib/test/cmath_testcases.txt b/Lib/test/mathdata/cmath_testcases.txt similarity index 100% rename from Lib/test/cmath_testcases.txt rename to Lib/test/mathdata/cmath_testcases.txt diff --git a/Lib/test/floating_points.txt b/Lib/test/mathdata/floating_points.txt similarity index 100% rename from Lib/test/floating_points.txt rename to Lib/test/mathdata/floating_points.txt diff --git a/Lib/test/formatfloat_testcases.txt b/Lib/test/mathdata/formatfloat_testcases.txt similarity index 100% rename from Lib/test/formatfloat_testcases.txt rename to Lib/test/mathdata/formatfloat_testcases.txt diff --git a/Lib/test/ieee754.txt b/Lib/test/mathdata/ieee754.txt similarity index 100% rename from Lib/test/ieee754.txt rename to Lib/test/mathdata/ieee754.txt diff --git a/Lib/test/math_testcases.txt b/Lib/test/mathdata/math_testcases.txt similarity index 100% rename from Lib/test/math_testcases.txt rename to Lib/test/mathdata/math_testcases.txt diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py index c4ee1e08251d63..98e11919430a10 100644 --- a/Lib/test/test_float.py +++ b/Lib/test/test_float.py @@ -25,7 +25,7 @@ #locate file with float format test values test_dir = os.path.dirname(__file__) or os.curdir -format_testfile = os.path.join(test_dir, 'formatfloat_testcases.txt') +format_testfile = os.path.join(test_dir, 'mathdata', 'formatfloat_testcases.txt') class FloatSubclass(float): pass @@ -763,6 +763,7 @@ def test_issue35560(self): class ReprTestCase(unittest.TestCase): def test_repr(self): with open(os.path.join(os.path.split(__file__)[0], + 'mathdata', 'floating_points.txt'), encoding="utf-8") as floats_file: for line in floats_file: line = line.strip() diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index b71d08b1124497..d5d2197c36b254 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -33,8 +33,8 @@ else: file = __file__ test_dir = os.path.dirname(file) or os.curdir -math_testcases = os.path.join(test_dir, 'math_testcases.txt') -test_file = os.path.join(test_dir, 'cmath_testcases.txt') +math_testcases = os.path.join(test_dir, 'mathdata', 'math_testcases.txt') +test_file = os.path.join(test_dir, 'mathdata', 'cmath_testcases.txt') def to_ulps(x): @@ -2559,7 +2559,7 @@ def test_fractions(self): def load_tests(loader, tests, pattern): from doctest import DocFileSuite - tests.addTest(DocFileSuite("ieee754.txt")) + tests.addTest(DocFileSuite(os.path.join("mathdata", "ieee754.txt"))) return tests if __name__ == '__main__': diff --git a/Makefile.pre.in b/Makefile.pre.in index 35f254508579bf..a9d54b0e364b72 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -2151,6 +2151,7 @@ TESTSUBDIRS= idlelib/idle_test \ test/encoded_modules \ test/leakers \ test/libregrtest \ + test/mathdata \ test/subprocessdata \ test/support \ test/support/_hypothesis_stubs \