Slide 13
Slide 13 text
Testing in Groups
import pytest
import time
@pytest.mark.concgroup(1)
@pytest.mark.parametrize('para', [1, 2, 3, 4, 5])
def test_something(para):
time.sleep(2)
assert para % 2
@pytest.mark.concgroup(1)
def test_something_else():
time.sleep(1)
assert 1 == 2
@pytest.mark.concgroup(2)
@pytest.mark.parametrize('name', ['this', 'is', 'a', 'book'])
def test_second_group(name):
time.sleep(2)
def test_something_last():
time.sleep(2)
raise MemoryError
@pytest.mark.concgroup(group: int)
https://goo.gl/mxthn3