Skip to content

Commit

Permalink
add to test-data unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcapriot committed Aug 16, 2024
1 parent b234249 commit e62a617
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions test-data/unit/stubgen.test
Original file line number Diff line number Diff line change
Expand Up @@ -3641,6 +3641,58 @@ class B:
def quoteD() -> None:
'''raw with quotes\\"'''

[case testIncludeDocstringsInspectMode]
# flags: --include-docstrings --inspect-mode
class A:
"""class docstring

a multiline 😊 docstring"""
def func():
"""func docstring
don't forget to indent"""
...
def nodoc():
...
class B:
def quoteA():
'''func docstring with quotes"""\\n
and an end quote\''''
...
def quoteB():
'''func docstring with quotes"""
\'\'\'
and an end quote\\"'''
...
def quoteC():
"""func docstring with end quote\\\""""
...
def quoteD():
r'''raw with quotes\"'''
...
[out]
class A:
"""class docstring

a multiline 😊 docstring"""
def func() -> None:
"""func docstring
don't forget to indent"""
def nodoc() -> None: ...

class B:
def quoteA() -> None:
'''func docstring with quotes"""\\n
and an end quote\''''
def quoteB() -> None:
'''func docstring with quotes"""
\'\'\'
and an end quote\\"'''
def quoteC() -> None:
'''func docstring with end quote\\"'''
def quoteD() -> None:
'''raw with quotes\\"'''


[case testIgnoreDocstrings]
class A:
"""class docstring
Expand Down

0 comments on commit e62a617

Please sign in to comment.