MCPcopy Index your code
hub / github.com/python/cpython / test_no_colors

Method test_no_colors

Lib/test/test__colorize.py:48–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46 self.assertEqual(copy.unittest, unittest_no_colors)
47
48 def test_no_colors(self):
49 # idempotence test
50 theme_no_colors = _colorize.Theme().no_colors()
51 theme_no_colors_no_colors = theme_no_colors.no_colors()
52 self.assertEqual(theme_no_colors, theme_no_colors_no_colors)
53
54 # attributes check
55 for section in dataclasses.fields(_colorize.Theme):
56 with self.subTest(section.name):
57 section_theme = getattr(theme_no_colors, section.name)
58 self.assertEqual(section_theme, section.type.no_colors())
59
60
61class TestColorizeFunction(unittest.TestCase):

Callers

nothing calls this directly

Calls 4

fieldsMethod · 0.80
no_colorsMethod · 0.45
assertEqualMethod · 0.45
subTestMethod · 0.45

Tested by

no test coverage detected