From 35fb8a942c3e7b822855ed1b55abf5a9ba4f58ed Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 27 Dec 2019 16:28:07 +0100 Subject: [PATCH] Make sure pytest stdlib fixtures are completable --- jedi/plugins/pytest.py | 5 ++++- test/completion/pytest.py | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/jedi/plugins/pytest.py b/jedi/plugins/pytest.py index ac7a630f..aa35f50b 100644 --- a/jedi/plugins/pytest.py +++ b/jedi/plugins/pytest.py @@ -6,7 +6,10 @@ from jedi.inference.filters import ParserTreeFilter from jedi.inference.base_value import NO_VALUES, ValueSet _PYTEST_FIXTURE_MODULES = [ - ('_pytest', 'monkeypatch') + ('_pytest', 'monkeypatch'), + ('_pytest', 'capture'), + ('_pytest', 'logging'), + ('_pytest', 'tmpdir'), ] diff --git a/test/completion/pytest.py b/test/completion/pytest.py index a301c142..5a879fe1 100644 --- a/test/completion/pytest.py +++ b/test/completion/pytest.py @@ -129,3 +129,10 @@ def test_p(monkeyp def test_p(monkeypatch): #? ['setattr'] monkeypatch.setatt + + +#? ['capsysbinary'] +def test_p(capsysbin + +#? ['tmpdir', 'tmpdir_factory'] +def test_p(tmpdi