Show More
@@ -492,7 +492,7 def test_pinfo_docstring_if_detail_and_no_source(): | |||
|
492 | 492 | sys.version_info.releaselevel not in ("final", "candidate"), |
|
493 | 493 | reason="fails on 3.13.dev", |
|
494 | 494 | ) |
|
495 | def test_pinfo_docstring_dynamic(): | |
|
495 | def test_pinfo_docstring_dynamic(capsys): | |
|
496 | 496 | obj_def = """class Bar: |
|
497 | 497 | __custom_documentations__ = { |
|
498 | 498 | "prop" : "cdoc for prop", |
@@ -513,20 +513,25 def test_pinfo_docstring_dynamic(): | |||
|
513 | 513 | |
|
514 | 514 | ip.run_cell("b = Bar()") |
|
515 | 515 | |
|
516 | with AssertPrints("Docstring: cdoc for prop"): | |
|
517 | 516 |
|
|
517 | captured = capsys.readouterr() | |
|
518 | assert "Docstring: cdoc for prop" in captured.out | |
|
518 | 519 | |
|
519 | with AssertPrints("Docstring: cdoc for non_exist"): | |
|
520 | 520 |
|
|
521 | captured = capsys.readouterr() | |
|
522 | assert "Docstring: cdoc for non_exist" in captured.out | |
|
521 | 523 | |
|
522 | with AssertPrints("Docstring: cdoc for prop"): | |
|
523 | 524 |
|
|
525 | captured = capsys.readouterr() | |
|
526 | assert "Docstring: cdoc for prop" in captured.out | |
|
524 | 527 | |
|
525 | with AssertPrints("Docstring: cdoc for non_exist"): | |
|
526 | 528 |
|
|
529 | captured = capsys.readouterr() | |
|
530 | assert "Docstring: cdoc for non_exist" in captured.out | |
|
527 | 531 | |
|
528 | with AssertPrints("Docstring: <no docstring>"): | |
|
529 | 532 |
|
|
533 | captured = capsys.readouterr() | |
|
534 | assert "Docstring: <no docstring>" in captured.out | |
|
530 | 535 | |
|
531 | 536 | |
|
532 | 537 | def test_pinfo_magic(): |
General Comments 0
You need to be logged in to leave comments.
Login now