Fix a stub docs issue

This commit is contained in:
Dave Halter
2021-11-16 21:27:00 +01:00
parent 195695edd3
commit e580d1f4d9
2 changed files with 17 additions and 0 deletions

View File

@@ -37,6 +37,17 @@ def test_operator_doc(Script):
assert len(d.docstring()) > 100
@pytest.mark.parametrize(
'code, help_part', [
('str', 'Create a new string object'),
('str.strip', 'Return a copy of the string'),
]
)
def test_stdlib_doc(Script, code, help_part):
h, = Script(code).help()
assert help_part in h.docstring(raw=True)
def test_lambda(Script):
d, = Script('lambda x: x').help(column=0)
assert d.type == 'keyword'