Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: accept folding of decorator parameters in Python 3.9 #9

Merged
merged 2 commits into from
Apr 9, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
TST: accept folding of decorator parameters in Python 3.9
  • Loading branch information
bnavigator committed Apr 1, 2021
commit 2d3c52c7b9debd73073650d22a3aa6e86d5491aa
8 changes: 6 additions & 2 deletions test/plugins/test_folding.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2019 Palantir Technologies, Inc.

import sys
from textwrap import dedent

from pyls import uris
from pyls.workspace import Document
from pyls.plugins.folding import pyls_folding_range

from pyls.workspace import Document

DOC_URI = uris.from_fs_path(__file__)
DOC = dedent("""
Expand Down Expand Up @@ -146,6 +146,10 @@ def test_folding(workspace):
{'startLine': 62, 'endLine': 63},
{'startLine': 64, 'endLine': 65},
{'startLine': 67, 'endLine': 68}]
if sys.version_info[:2] >= (3, 9):
# the argument list of the decorator is also folded in Python >= 3.9
expected.insert(4, {'startLine': 9, 'endLine': 10})

assert ranges == expected


Expand Down