Skip to content

Commit 6359876

Browse files
committed
Fail more tests
1 parent 14394da commit 6359876

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎Lib/test/test_bool.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from test.support import os_helper
55

66
import os
7+
import sys
78

89
class BoolTest(unittest.TestCase):
910

@@ -25,6 +26,11 @@ def test_repr(self):
2526
self.assertIs(eval(repr(True)), True)
2627

2728
def test_str(self):
29+
if sys.platform == "linux":
30+
# XXX: Intentional failure to test GitHub Actions annotations
31+
self.assertEqual(
32+
str(True),
33+
'Yes')
2834
self.assertEqual(str(False), 'False')
2935
self.assertEqual(str(True), 'True')
3036

‎Lib/test/test_json/test_decode.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import decimal
2+
import sys
23
import unittest.mock
34
from io import StringIO
45
from collections import OrderedDict
@@ -9,6 +10,9 @@
910
class TestDecode:
1011
def test_decimal(self):
1112
rval = self.loads('1.1', parse_float=decimal.Decimal)
13+
if sys.platform == "linux":
14+
# XXX: Intentional failure to test GitHub Actions annotations
15+
self.loads('{"bad": }')
1216
self.assertIsInstance(rval, decimal.Decimal)
1317
self.assertEqual(rval, decimal.Decimal('1.1'))
1418

‎Lib/test/test_math.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,11 @@ def testFabs(self):
513513

514514
def testFloor(self):
515515
self.assertRaises(TypeError, math.floor)
516+
if sys.platform == "linux":
517+
# XXX: Intentional failure to test GitHub Actions annotations
518+
for x in (0.5, 1.5):
519+
with self.subTest(x=x):
520+
self.assertEqual(math.floor(x), x)
516521
self.assertEqual(int, type(math.floor(0.5)))
517522
self.assertEqual(math.floor(0.5), 0)
518523
self.assertEqual(math.floor(1.0), 1)

‎Lib/test/test_textwrap.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# $Id$
99
#
1010

11+
import os
12+
import sys
1113
import unittest
1214

1315
from textwrap import TextWrapper, wrap, fill, dedent, indent, shorten
@@ -66,6 +68,9 @@ def test_simple(self):
6668
self.check_wrap(text, 80, [text])
6769

6870
def test_empty_string(self):
71+
if sys.platform == "linux":
72+
# XXX: Intentional failure to test GitHub Actions annotations
73+
os.environ["GHA_ANNOTATION_TEST"] = "1"
6974
# Check that wrapping the empty string returns an empty list.
7075
self.check_wrap("", 6, [])
7176
self.check_wrap("", 6, [], drop_whitespace=False)

0 commit comments

Comments
 (0)