mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
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)
34 lines
716 B
Python
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>#
|