X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/52fda8b0e9e52e94aae6cb3170c9b1b492a2d8b4..23a00f051576d2e7edd18b6af382902cc34ea4a2:/tests/comments2.py?ds=sidebyside diff --git a/tests/comments2.py b/tests/comments2.py index 44a4711..32a2ab3 100644 --- a/tests/comments2.py +++ b/tests/comments2.py @@ -23,6 +23,25 @@ __all__ = [ 'Generator', ] +not_shareables = [ + # singletons + True, + False, + NotImplemented, ..., + # builtin types and objects + type, + object, + object(), + Exception(), + 42, + 100.0, + "spam", + # user-defined types and objects + Cheese, + Cheese("Wensleydale"), + SubBytes(b"spam"), +] + if 'PYTHON' in os.environ: add_compiler(compiler_from_env()) else: @@ -35,9 +54,9 @@ else: def inline_comments_in_brackets_ruin_everything(): if typedargslist: parameters.children = [ - parameters.children[0], # (1 + children[0], # (1 body, - parameters.children[-1], # )1 + children[-1], # )1 ] else: parameters.children = [ @@ -152,6 +171,26 @@ __all__ = [ "Generator", ] +not_shareables = [ + # singletons + True, + False, + NotImplemented, + ..., + # builtin types and objects + type, + object, + object(), + Exception(), + 42, + 100.0, + "spam", + # user-defined types and objects + Cheese, + Cheese("Wensleydale"), + SubBytes(b"spam"), +] + if "PYTHON" in os.environ: add_compiler(compiler_from_env()) else: @@ -163,9 +202,7 @@ else: # Comment before function. def inline_comments_in_brackets_ruin_everything(): if typedargslist: - parameters.children = [ - parameters.children[0], body, parameters.children[-1] # (1 # )1 - ] + parameters.children = [children[0], body, children[-1]] # (1 # )1 else: parameters.children = [ parameters.children[0], # (2 what if this was actually long