Specifying a specific parametrization of a test #12740
-
hello teachers,i'm a beginner,i'm reading the documentation for pytest,i'm learning how to invoke pytest, |
Beta Was this translation helpful? Give feedback.
Answered by
The-Compiler
Aug 26, 2024
Replies: 1 comment
-
You might want to read more about parametrizing test functions in order to understand that example. Based on that, imagine a import pytest
@pytest.mark.parametrize("a, b", [("x1", "y2"), ("v3", "w4")])
def test_func(a, b):
... which will result in two test cases:
and the shown invocation will run the first one only. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
1p1e3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You might want to read more about parametrizing test functions in order to understand that example.
Based on that, imagine a
test_mod.py
likewhich will result in two test cases:
and the shown invocation will run the first one only.