We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6719b32 commit ca4ab58Copy full SHA for ca4ab58
1 file changed
Lib/test/test_calendar.py
@@ -1256,6 +1256,15 @@ def test_html_output_year_css(self):
1256
self.assertIn(b'<link rel="stylesheet" href="custom.css">', output)
1257
1258
1259
+@support.force_colorized_test_class
1260
+class ColorTestCase(unittest.TestCase):
1261
+ def test_formatmonth_color(self):
1262
+ today = datetime.date(2026, 5, 4)
1263
+ cal = calendar._CLIDemoCalendar(highlight_day=today)
1264
+ output = cal.formatmonth(2026, 5)
1265
+ self.assertIn("\x1b[30m\x1b[43mMay 2026\x1b[0m\n\x1b[36m", output)
1266
+
1267
1268
class MiscTestCase(unittest.TestCase):
1269
def test__all__(self):
1270
not_exported = {
0 commit comments