Skip to content

Commit

Permalink
Relax string checks in test_pinfo_docstring_dynamic
Browse files Browse the repository at this point in the history
Allows this test to pass on Python 3.13
  • Loading branch information
takluyver committed Aug 26, 2024
1 parent 7ea81cd commit 44bffab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions IPython/core/tests/test_oinspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,23 +516,23 @@ def prop(self, v):

ip.run_line_magic("pinfo", "b.prop")
captured = capsys.readouterr()
assert "Docstring: cdoc for prop" in captured.out
assert re.search(r"Docstring:\s+cdoc for prop", captured.out)

ip.run_line_magic("pinfo", "b.non_exist")
captured = capsys.readouterr()
assert "Docstring: cdoc for non_exist" in captured.out
assert re.search(r"Docstring:\s+cdoc for non_exist", captured.out)

ip.run_cell("b.prop?")
captured = capsys.readouterr()
assert "Docstring: cdoc for prop" in captured.out
assert re.search(r"Docstring:\s+cdoc for prop", captured.out)

ip.run_cell("b.non_exist?")
captured = capsys.readouterr()
assert "Docstring: cdoc for non_exist" in captured.out
assert re.search(r"Docstring:\s+cdoc for non_exist", captured.out)

ip.run_cell("b.undefined?")
captured = capsys.readouterr()
assert "Docstring: <no docstring>" in captured.out
assert re.search(r"Type:\s+NoneType", captured.out)


def test_pinfo_magic():
Expand Down

0 comments on commit 44bffab

Please sign in to comment.