()
| 604 | |
| 605 | |
| 606 | def 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 = """\ |
| 621 | long_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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…