-
-
Notifications
You must be signed in to change notification settings - Fork 524
Open
Description
Hi and thanks for the amazing software!
I'm using Jedi through python-lsp-server inside Neovim - this chain of tools makes me doubt whether this is the right place to ask about this, but hopefully it is.
And I'd like to ask about the possibility of supporting the resolution of Pytest fixtures when a fixture is defined inside a class.
The following example show the current behaviour where a fixture (fix) defined as a method inside a class is not recognized properly and the fix parameter in test_fix is incorrectly linked by Jedi to the function defined outside the class while Pytest will actually use the class method.
Would it be possible to fix this? Thanks!
import pytest
class Obj:
attr = 1
class OtherObj:
other_attr = 1
@pytest.fixture
def fix():
return Obj()
class TestClass:
@pytest.fixture
def fix(self):
return OtherObj()
def test_fix(self, fix):
fix.attr # gets completed but should not, goToDefinition takes me to the function but should take me to the method
fix.other_attr # doesn't get completed but shouldReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels