Created
April 13, 2021 10:59
-
-
Save wmvanvliet/36471bb456151d93b86c402b64684b0a to your computer and use it in GitHub Desktop.
Test cases for python docstring highlighting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This should be a docstring. | |
Second line of the docstring. | |
""" | |
"""This should not be a docstring.""" | |
b"""This should not be a docstring.""" | |
r"""This should not be a docstring.""" | |
"This should not be a docstring." | |
def test1(): | |
"""This should be a docstring.""" | |
"""This should not be a docstring.""" | |
def test2(): | |
b"""This should not be a docstring.""" | |
def test3(): | |
r"""This should not be a docstring.""" | |
def test4(): | |
"This should not be a docstring." | |
def test5(): | |
a = """This should not be a docstring""" | |
def test6(): | |
b = """This | |
should not be | |
a docstring.""" | |
def test7(): | |
c = """This should not be | |
a docstring. | |
""" | |
def test8(): | |
d = ( | |
"""This should not be a docstring""" | |
) | |
def test9(): | |
e = "This should not be a docstring" | |
class test10: | |
"""This should be a docstring.""" | |
def __init__(self): | |
"""This should be a docstring. | |
Second line of the docstring. | |
""" | |
"""This should not be a docstring.""" | |
def test11():"""Should not be a docstring""" | |
def test12(): | |
'''This should be a docstring''' | |
pass | |
def test13(a:int) -> bool: | |
'''This should be a docstring''' | |
pass | |
def test14(): | |
'''This should be a docstring''' | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment