File: test_parameterize.py

package info (click to toggle)
python-allpairspy 2.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 204 kB
  • sloc: python: 627; makefile: 42; sh: 6
file content (29 lines) | stat: -rw-r--r-- 677 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python3

"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""

import pytest

from allpairspy import AllPairs


def function_to_be_tested(brand: str, operating_system: str, minute: int) -> bool:
    # do something

    return True


class TestParameterized:
    @pytest.mark.parametrize(
        ["brand", "operating_system", "minute"],
        [
            values
            for values in AllPairs(
                [["Brand X", "Brand Y"], ["98", "NT", "2000", "XP"], [10, 15, 30, 60]]
            )
        ],
    )
    def test(self, brand, operating_system, minute):
        assert function_to_be_tested(brand, operating_system, minute)