Simplify, very slightly, how the parameterize decorator is used

This commit is contained in:
Alex Gaynor 2014-12-06 11:20:16 -08:00
parent c13b1e80fd
commit ec8b0f7da9

View File

@ -49,7 +49,7 @@ def test_gensalt_rounds_valid(rounds, expected, monkeypatch):
assert bcrypt.gensalt(rounds) == expected
@pytest.mark.parametrize(("rounds",), [[x] for x in range(1, 4)])
@pytest.mark.parametrize("rounds", list(range(1, 4)))
def test_gensalt_rounds_invalid(rounds, monkeypatch):
urandom = mock.Mock(return_value=b"0000000000000000")
monkeypatch.setattr(os, "urandom", urandom)