Email or username:

Password:

Forgot your password?
Simon Willison

TIL how to use namedtuple with pytest parameterized tests to make the parameters easier to read til.simonwillison.net/pytest/n

3 comments
Joshua Cannon

@simon I wonder if dataclasses could be used to help with type safety. (I don't see why not. 🤔)

rednafi

@simon

Ditto. I recently wrote one to utilize `pytest.param` and `kwargs` inside parametrize to make things more tractable.

rednafi.com/python/pytest_para

Go Up