Skip to content

Commit 62fe5fc

Browse files
committed
Disable tests in older Python versions that fail due to different error messages.
1 parent 7a846ab commit 62fe5fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test_fractions.py

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ def requires_IEEE_754(test): return test
4141
F = quicktions.Fraction
4242
gcd = quicktions._gcd
4343

44+
requires_py310 = unittest.skipIf(sys.version_info <= (3, 10), "needs Python 3.10+")
45+
4446
#locate file with float format test values
4547
test_dir = os.path.dirname(__file__) or os.curdir
4648
format_testfile = os.path.join(test_dir, 'formatfloat_testcases.txt')
@@ -1860,6 +1862,7 @@ def test_float_format_testfile(self):
18601862
self.assertEqual(float(format(f, fmt2)), float(rhs))
18611863
self.assertEqual(float(format(-f, fmt2)), float('-' + rhs))
18621864

1865+
@requires_py310
18631866
def test_complex_handling(self):
18641867
# See issue gh-102840 for more details.
18651868

@@ -1887,6 +1890,7 @@ def test_complex_handling(self):
18871890
message % ("divmod()", "complex", "quicktions.Fraction"),
18881891
divmod, b, a)
18891892

1893+
@requires_py310
18901894
def test_three_argument_pow(self):
18911895
message = "unsupported operand type(s) for ** or pow(): '%s', '%s', '%s'"
18921896
self.assertRaisesMessage(TypeError,

0 commit comments

Comments
 (0)