import pytest # @pytest.fixture def my_fixture(): yield "hello" @pytest.fixture def ham(my_fixt): return 42 def test_sample_test(my_fixt): pass def test_ham(ham, my_fixture): ham.bit_len# my_fixture.swapca# @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,egg,firs,secon): pass @pytest.mark.parametrize('first,second', [('a', 1), (1, 'a')]) def test_sample(first, second): first.bit_lengt# first.forma# first.__xor_# second.bit_lengt# second.forma# second.__xor_# def test_type(first, second:set): second.updat# class TestFoo1: @pytest.fixture def my_fixture(self): return 42 @pytest.fixture def another_fix(): pass class TestFoo2: @pytest.fixture def my_fixture(self): return {"D": 42 } @pytest.fixture def class_only_fixture(): return 1 def test_bar(self, my_fix, ha, class_only_f): pass # No completion for another: different class def test_foo(self, my_fixture, another_fix): assert my_fixture.ke # No completion, declated in class def test_bar(class_only_fix): pass