Files
openide/python/testData/testCompletion/test_test.py
Ilya.Kazakevich 3a4b52660e PY-31051: pytest fixtures may use yield
In this case we must fetch real type from generator.
We also should open union if one is returned instead
of generator itself.

Any decorator leads to weak type (Union[Any, T]). To fix it, we use KnownDecorators (its better to use EP there)
2018-08-21 22:26:43 +03:00

34 lines
716 B
Python

import pytest
#
@pytest.fixture
def my_fixture():
yield "hello"
@pytest.fixture
def ham(my_fixt<caret>):
return 42
def test_sample_test(my_fixt<caret>):
pass
def test_ham(ham, my_fixture):
ham.bit_len<caret>#
my_fixture.swapca<caret>#
@pytest.mark.parametrize(('spam,eggs'), [(1,1), (2,3), (3,3)])
@pytest.mark.parametrize('first,second', [(1,1), (2,3), (3,3)])
def test_sample(spa<caret>,egg<caret>,firs<caret>,secon<caret>):
pass
@pytest.mark.parametrize('first,second', [('a', 1), (1, 'a')])
def test_sample(first, second):
first.bit_lengt<caret>#
first.forma<caret>#
first.__xor_<caret>#
second.bit_lengt<caret>#
second.forma<caret>#
second.__xor_<caret>#