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

Method test_copy_with

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

Source from the content-addressed store, hash-verified

32 self.assertIsNotNone(field.default_factory)
33
34 def test_copy_with(self):
35 theme = _colorize.Theme()
36
37 copy = theme.copy_with()
38 self.assertEqual(theme, copy)
39
40 unittest_no_colors = _colorize.Unittest.no_colors()
41 copy = theme.copy_with(unittest=unittest_no_colors)
42 self.assertEqual(copy.argparse, theme.argparse)
43 self.assertEqual(copy.difflib, theme.difflib)
44 self.assertEqual(copy.syntax, theme.syntax)
45 self.assertEqual(copy.traceback, theme.traceback)
46 self.assertEqual(copy.unittest, unittest_no_colors)
47
48 def test_no_colors(self):
49 # idempotence test

Callers

nothing calls this directly

Calls 3

copy_withMethod · 0.95
assertEqualMethod · 0.45
no_colorsMethod · 0.45

Tested by

no test coverage detected