File size: 405 Bytes
079c32c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import numpy as np
import pytest
@pytest.fixture(scope='session')
def random_job_result():
def fn():
p = np.random.uniform()
if p < 1. / 3:
return "wins"
elif p < 2. / 3:
return "draws"
else:
return "losses"
return fn
@pytest.fixture(scope='session')
def get_job_result_categories():
return ["wins", 'draws', 'losses']
|