File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
pytest_cases/tests/cases/issues Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ # --- This test is valid but it requires asyncio which is not guaranteed to always be ok with the version of python/pytest in travis.
2+ # For this reason I'll leave it commented for now, maybe one day we'll create a dedicated travis config for things like this
3+
4+ # import random
5+ # import pytest
6+ # from pytest_cases import parametrize_with_cases
7+ #
8+ #
9+ # def sum(a, b):
10+ # return a + b
11+ #
12+ #
13+ # @pytest.fixture
14+ # def random_num():
15+ # return random.randint(0, 65543)
16+ #
17+ #
18+ # def case_1(random_num: int):
19+ # return 1, random_num, 1 + random_num
20+ #
21+ #
22+ # def case_2(random_num: int):
23+ # return 2, random_num, 2 + random_num
24+ #
25+ #
26+ # @pytest.mark.asyncio
27+ # @parametrize_with_cases('case', cases='.')
28+ # async def test_sum_of(case):
29+ # a, b, c = case
30+ # assert sum(a, b) == c
You can’t perform that action at this time.
0 commit comments