Show More
@@ -514,28 +514,20 b' def test_render_signature_long():' | |||
|
514 | 514 | signature(long_function), |
|
515 | 515 | long_function.__name__, |
|
516 | 516 | ) |
|
517 | assert sig in [ | |
|
518 | # Python >=3.9 | |
|
519 | '''\ | |
|
517 | if sys.version_info >= (3, 9): | |
|
518 | expected = """\ | |
|
520 | 519 | long_function( |
|
521 | 520 | a_really_long_parameter: int, |
|
522 | 521 | and_another_long_one: bool = False, |
|
523 | 522 | let_us_make_sure_this_is_looong: Optional[str] = None, |
|
524 | 523 | ) -> bool\ |
|
525 | ''', | |
|
526 | # Python >=3.7 | |
|
527 | '''\ | |
|
524 | """ | |
|
525 | else: | |
|
526 | expected = """\ | |
|
528 | 527 | long_function( |
|
529 | 528 | a_really_long_parameter: int, |
|
530 | 529 | and_another_long_one: bool = False, |
|
531 | 530 | let_us_make_sure_this_is_looong: Union[str, NoneType] = None, |
|
532 | 531 | ) -> bool\ |
|
533 | ''', # Python <=3.6 | |
|
534 | '''\ | |
|
535 | long_function( | |
|
536 | a_really_long_parameter:int, | |
|
537 | and_another_long_one:bool=False, | |
|
538 | let_us_make_sure_this_is_looong:Union[str, NoneType]=None, | |
|
539 | ) -> bool\ | |
|
540 | ''', | |
|
541 | ] | |
|
532 | """ | |
|
533 | assert sig == expected |
General Comments 0
You need to be logged in to leave comments.
Login now