Skip to content

Commit 75f2b44

Browse files
author
Sylvain MARIE
committed
Added test for #176.
1 parent fc44619 commit 75f2b44

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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

0 commit comments

Comments
 (0)