1import sys
2import pytest
3
4
5@pytest.mark.parametrize(
6 ("n", "expected"),
7 [
8 (1, 2),
9 pytest.param(1, 0, marks=pytest.mark.xfail),
10 pytest.param(1, 3, marks=pytest.mark.xfail(reason="some bug")),
11 (2, 3),
12 (3, 4),
13 (4, 5),
14 pytest.param(
15 10, 11, marks=pytest.mark.skipif(sys.version_info >= (3, 0), reason="py2k")
16 ),
17 ],
18)
19def test_increment(n, expected):
20 assert n + 1 == expected