1
1
# Copyright 2017-2020 Palantir Technologies, Inc.
2
2
# Copyright 2021- Python Language Server Contributors.
3
3
4
- import test
5
4
from pathlib import Path
6
5
7
6
import pytest
8
7
8
+ import test
9
9
from pylsp import uris
10
10
from pylsp .config .config import Config
11
11
from pylsp .plugins .rope_implementation import pylsp_implementations
@@ -42,12 +42,12 @@ def workspace(examples_dir_path: Path, endpoint) -> None:
42
42
43
43
def test_implementations (config , workspace , doc_uri ) -> None :
44
44
# Over 'fly' in WingedAnimal.fly
45
- cursor_pos = {"line" : 14 , "character" : 8 }
45
+ cursor_pos = {"line" : 15 , "character" : 8 }
46
46
47
47
# The implementation of 'Bird.fly'
48
48
def_range = {
49
- "start" : {"line" : 21 , "character" : 8 },
50
- "end" : {"line" : 21 , "character" : 11 },
49
+ "start" : {"line" : 22 , "character" : 8 },
50
+ "end" : {"line" : 22 , "character" : 11 },
51
51
}
52
52
53
53
doc = workspace .get_document (doc_uri )
@@ -58,12 +58,12 @@ def test_implementations(config, workspace, doc_uri) -> None:
58
58
59
59
def test_implementations_skipping_one_class (config , workspace , doc_uri ) -> None :
60
60
# Over 'Animal.breathe'
61
- cursor_pos = {"line" : 4 , "character" : 8 }
61
+ cursor_pos = {"line" : 5 , "character" : 8 }
62
62
63
63
# The implementation of 'breathe', skipping intermediate classes
64
64
def_range = {
65
- "start" : {"line" : 18 , "character" : 8 },
66
- "end" : {"line" : 18 , "character" : 15 },
65
+ "start" : {"line" : 19 , "character" : 8 },
66
+ "end" : {"line" : 19 , "character" : 15 },
67
67
}
68
68
69
69
doc = workspace .get_document (doc_uri )
@@ -77,12 +77,12 @@ def test_implementations_skipping_one_class(config, workspace, doc_uri) -> None:
77
77
)
78
78
def test_property_implementations (config , workspace , doc_uri ) -> None :
79
79
# Over 'Animal.size'
80
- cursor_pos = {"line" : 9 , "character" : 9 }
80
+ cursor_pos = {"line" : 10 , "character" : 9 }
81
81
82
82
# The property implementation 'Bird.size'
83
83
def_range = {
84
- "start" : {"line" : 25 , "character" : 8 },
85
- "end" : {"line" : 25 , "character" : 12 },
84
+ "start" : {"line" : 26 , "character" : 8 },
85
+ "end" : {"line" : 26 , "character" : 12 },
86
86
}
87
87
88
88
doc = workspace .get_document (doc_uri )
@@ -93,7 +93,7 @@ def test_property_implementations(config, workspace, doc_uri) -> None:
93
93
94
94
def test_implementations_not_a_method (config , workspace , doc_uri ) -> None :
95
95
# Over 'print(...)' call
96
- cursor_pos = {"line" : 28 , "character" : 0 }
96
+ cursor_pos = {"line" : 29 , "character" : 0 }
97
97
98
98
doc = workspace .get_document (doc_uri )
99
99
0 commit comments