Open pawamoy opened 2 months ago
Can't reproduce while debugging. external
calls are correctly identified. Maybe an issue with pytest-xdist again. UPDATE: yep, no such message when disabling pytest-xdist.
Quick thought: if inline-snapshot finds uses of external
by searching in the files collected by the current pytest process, then it's possible that one of the process didn't run a single test from my module using external
, and therefore inline-snapshot finds no reference to the existing snapshots. A solution would be to somehow check every test file used across the run (multiple process through xdist). Or maybe even all tests file, period, because if I unselect tests using external
, that doesn't mean my snapshots are unused.
0.9.0 contains now a check if you use xdist at the same time.
I think there are several issues with the current implementation of outsource
. I have some ideas how the DX could be improved and wrote it down (#86). Please tell me if you have some feedback.
When I run my test suite, I get this output at the end:
From the docs:
However if I run pytest with
--inline-snapshot=trim
it doesn't do anything. I have 11 external files indeed, so I suspect inline-snapshot doesn't detectexternal
calls in my code: