mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
Perform real shortcut processing as in production environment. Must not be called in WA due to that. GitOrigin-RevId: faa0302c4cd7460f08792e6170ae027cbd415de4
65 lines
1.3 KiB
Plaintext
65 lines
1.3 KiB
Plaintext
import pytest
|
|
|
|
#
|
|
@pytest.fixture
|
|
def my_fixture():
|
|
yield "hello"
|
|
|
|
@pytest.fixture
|
|
def ham(my_fixture):
|
|
return 42
|
|
|
|
|
|
def test_sample_test(my_fixture):
|
|
pass
|
|
|
|
def test_ham(ham, my_fixture):
|
|
ham.bit_length() #
|
|
my_fixture.swapcase() #
|
|
|
|
@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(spam,eggs,first ,second ):
|
|
pass
|
|
|
|
@pytest.mark.parametrize('first,second', [('a', 1), (1, 'a')])
|
|
def test_sample(first, second):
|
|
|
|
first.bit_length() #
|
|
first.format()#
|
|
first.__xor__()#
|
|
second.bit_length() #
|
|
second.format()#
|
|
second.__xor__()#
|
|
|
|
|
|
def test_type(first, second:set):
|
|
second.update()#
|
|
|
|
|
|
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_fixture, ham , class_only_fixture ):
|
|
pass
|
|
|
|
# No completion for another: different class
|
|
def test_foo(self, my_fixture, another_fix ):
|
|
assert my_fixture.keys()
|
|
|
|
# No completion, declated in class
|
|
def test_bar(class_only_fix ):
|
|
pass |