Skip to content

Commit 2d3c52c

Browse files
committed
TST: accept folding of decorator parameters in Python 3.9
1 parent 45ff79d commit 2d3c52c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/plugins/test_folding.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright 2019 Palantir Technologies, Inc.
22

3+
import sys
34
from textwrap import dedent
45

56
from pyls import uris
6-
from pyls.workspace import Document
77
from pyls.plugins.folding import pyls_folding_range
8-
8+
from pyls.workspace import Document
99

1010
DOC_URI = uris.from_fs_path(__file__)
1111
DOC = dedent("""
@@ -146,6 +146,10 @@ def test_folding(workspace):
146146
{'startLine': 62, 'endLine': 63},
147147
{'startLine': 64, 'endLine': 65},
148148
{'startLine': 67, 'endLine': 68}]
149+
if sys.version_info[:2] >= (3, 9):
150+
# the argument list of the decorator is also folded in Python >= 3.9
151+
expected.insert(4, {'startLine': 9, 'endLine': 10})
152+
149153
assert ranges == expected
150154

151155

0 commit comments

Comments
 (0)