MCPcopy Index your code
hub / github.com/ipython/ipython / test_render_signature_long

Function test_render_signature_long

tests/test_oinspect.py:606–630  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

604
605
606def test_render_signature_long():
607 from typing import Optional
608
609 def long_function(
610 a_really_long_parameter: int,
611 and_another_long_one: bool = False,
612 let_us_make_sure_this_is_looong: Optional[str] = None,
613 ) -> bool:
614 pass
615
616 sig = oinspect._render_signature(
617 signature(long_function),
618 long_function.__name__,
619 )
620 expected = """\
621long_function(
622 a_really_long_parameter: int,
623 and_another_long_one: bool = False,
624 let_us_make_sure_this_is_looong: Optional[str] = None,
625) -> bool\
626"""
627 if sys.version_info >= (3, 14):
628 expected = expected.replace("Optional[str]", "str | None")
629
630 assert sig == expected

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…