()
| 408 | |
| 409 | |
| 410 | def test_render_signature_long(): |
| 411 | from typing import Optional |
| 412 | |
| 413 | def long_function( |
| 414 | a_really_long_parameter: int, |
| 415 | and_another_long_one: bool = False, |
| 416 | let_us_make_sure_this_is_looong: Optional[str] = None, |
| 417 | ) -> bool: pass |
| 418 | |
| 419 | sig = oinspect._render_signature( |
| 420 | signature(long_function), |
| 421 | long_function.__name__, |
| 422 | ) |
| 423 | nt.assert_in(sig, [ |
| 424 | # Python >=3.9 |
| 425 | '''\ |
| 426 | long_function( |
| 427 | a_really_long_parameter: int, |
| 428 | and_another_long_one: bool = False, |
| 429 | let_us_make_sure_this_is_looong: Optional[str] = None, |
| 430 | ) -> bool\ |
| 431 | ''', |
| 432 | # Python >=3.7 |
| 433 | '''\ |
| 434 | long_function( |
| 435 | a_really_long_parameter: int, |
| 436 | and_another_long_one: bool = False, |
| 437 | let_us_make_sure_this_is_looong: Union[str, NoneType] = None, |
| 438 | ) -> bool\ |
| 439 | ''', # Python <=3.6 |
| 440 | '''\ |
| 441 | long_function( |
| 442 | a_really_long_parameter:int, |
| 443 | and_another_long_one:bool=False, |
| 444 | let_us_make_sure_this_is_looong:Union[str, NoneType]=None, |
| 445 | ) -> bool\ |
| 446 | ''', |
| 447 | ]) |
nothing calls this directly
no outgoing calls
no test coverage detected