0

There is such a function:

def underscore_concat(*args):
    return "_".join(filter(None, ([*args]))).upper()

How to correctly pass multiple parameters using pytest.mark.parametrize?

Something like this:

@pytest.mark.parametrize("a, result", [(["underscore", "concat", "test"], "UNDERSCORE_CONCAT_TEST")])
def test_underscore_concat(a, result):
    assert underscore_concat(**a) == result
Luice712
  • 3
  • 2

1 Answers1

0
@pytest.mark.parametrize("a, result", [(["underscore", "concat", "test"], "UNDERSCORE_CONCAT_TEST")])
def test_underscore_concat(a, result):
    assert underscore_concat(*a) == result
Luice712
  • 3
  • 2