55from pathlib import Path
66
77import pytest
8- from rope .base .exceptions import BadIdentifierError
98
109from pylsp import uris
1110from pylsp .config .config import Config
@@ -74,7 +73,7 @@ def test_implementations_skipping_one_class(config, workspace, doc_uri) -> None:
7473
7574
7675@pytest .mark .xfail (
77- reason = "not implemented upstream (Rope)" , strict = True , raises = BadIdentifierError
76+ reason = "not implemented upstream (Rope)" , strict = True , raises = AssertionError
7877)
7978def test_property_implementations (config , workspace , doc_uri ) -> None :
8079 # Over 'Animal.size'
@@ -93,12 +92,11 @@ def test_property_implementations(config, workspace, doc_uri) -> None:
9392
9493
9594def test_implementations_not_a_method (config , workspace , doc_uri ) -> None :
96- # Over 'print(...)' call => Rope error because not a method.
95+ # Over 'print(...)' call
9796 cursor_pos = {"line" : 28 , "character" : 0 }
9897
9998 doc = workspace .get_document (doc_uri )
10099
101- # This exception is turned into an empty result set automatically in upper
102- # layers, so we just check that it is raised to document this behavior:
103- with pytest .raises (BadIdentifierError ):
104- pylsp_implementations (config , workspace , doc , cursor_pos )
100+ # Rope produces an error because we're not over a method, which we then
101+ # turn into an empty result list:
102+ assert [] == pylsp_implementations (config , workspace , doc , cursor_pos )
0 commit comments