pytorch-labs / torchfix

TorchFix - a linter for PyTorch-using code with autofix support
Other
98 stars 16 forks source link

Split tests into individual test cases #67

Closed sbrugman closed 1 month ago

sbrugman commented 2 months ago

metafunc.parametrize can be used to create more granular test cases by dynamically generating test fixtures (i.e. arguments). This in our case is helpful for debugging failing test cases, by knowing directly which of the paths are failing.

Before

After

Changes:

sbrugman commented 2 months ago

Resolved merge conflict. I'll start adding some lint rules once this one it merged.

sbrugman commented 2 months ago

@kit1980 Any objections merging this? Generation of tests with metafunc is coming staight from the pytest docs and seems to be the idiomatic way of doing so.

kit1980 commented 1 month ago

Looks good to me, thanks! Please resolve conflicts before merging.