Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pytest
- @pytest.parametrize(
- ['input', 'expected_output'],
- [
- # Fold in before space
- ("""
- func(a, b, c,| d, e, f)
- """,
- """
- func(a, b, c,
- |d, e, f)
- """),
- # Fold-in after space (strip?)
- ("""
- func(a, b, c, |d, e, f)
- """,
- """
- func(a, b, c,
- |d, e, f)
- """),
- # After nested fold-in
- ("""
- func(a, (b, c),|)
- """,
- """
- func(a, (b, c),
- |)
- """),
- # Block with content
- ("""
- l = [|a]
- """,
- """
- l = [
- |a
- ]
- """),
- ("""
- l = [|a, b
- c, d]
- """,
- """
- l = [
- |a, b
- c, d
- ]
- """),
- # Empty block
- ("""
- func(|)
- """,
- """
- func(
- |
- )
- """),
- # block in fold-in TOREVIEW
- ("""
- func(a, b, (|))
- """,
- """
- func(a, b, (
- |
- ))
- """),
- # Multiple nested fold-in brackets
- ("""
- (DC('tagsOptions', '...'),
- ('tagsOptions', [('IDENT', "foreground"),|
- """,
- """
- (DC('tagsOptions', '...'),
- ('tagsOptions', [('IDENT', "foreground"),
- |
- """),
- ("""
- (DC('tagsOptions', '...'),
- ('tagsOptions', [('IDENT', "foreground"),|]))
- """,
- """
- (DC('tagsOptions', '...'),
- ('tagsOptions', [('IDENT', "foreground"),
- |]))
- """),
- ("""
- (DC('tagsOptions', '...'),
- ('tagsOptions', [('IDENT', "foreground")]|))
- """,
- """
- (DC('tagsOptions', '...'),
- ('tagsOptions', [('IDENT', "foreground")]
- |))
- """),
- ("""
- (DC('tagsOptions', '...'),
- ('tagsOptions', [('IDENT', "foreground")])|)
- """,
- """
- (DC('tagsOptions', '...'),
- ('tagsOptions', [('IDENT', "foreground")])
- |)
- """),
- # Comma-aware
- ("""
- a(b + c, d |+)
- """,
- """
- a(b + c, d
- |+)
- """),
- # Nested comma-aware (with content)
- ("""
- a(b, (c, d |+))
- """,
- """
- a(b, (c, d
- |+))
- """),
- # Nested comma-aware (without content or closing brackets)
- ("""
- a(b, (c, d|
- """,
- """
- a(b, (c, d
- |
- """),
- ]
- )
- def test_(input, expected_output):
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement