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

Method test_Block_repr

Lib/test/test_clinic.py:4730–4749  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4728
4729class ClinicReprTests(unittest.TestCase):
4730 def test_Block_repr(self):
4731 block = Block("foo")
4732 expected_repr = "<clinic.Block 'text' input='foo' output=None>"
4733 self.assertEqual(repr(block), expected_repr)
4734
4735 block2 = Block("bar", "baz", [], "eggs", "spam")
4736 expected_repr_2 = "<clinic.Block 'baz' input='bar' output='eggs'>"
4737 self.assertEqual(repr(block2), expected_repr_2)
4738
4739 block3 = Block(
4740 input="longboi_" * 100,
4741 dsl_name="wow_so_long",
4742 signatures=[],
4743 output="very_long_" * 100,
4744 indent=""
4745 )
4746 expected_repr_3 = (
4747 "<clinic.Block 'wow_so_long' input='longboi_longboi_longboi_l...' output='very_long_very_long_very_...'>"
4748 )
4749 self.assertEqual(repr(block3), expected_repr_3)
4750
4751 def test_Destination_repr(self):
4752 c = _make_clinic()

Callers

nothing calls this directly

Calls 2

BlockClass · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected