syrusakbary / snapshottest

Snapshot Testing utils for Python 📸
MIT License
530 stars 103 forks source link

Stacktrace includes snapshottest implementation details #155

Open C0DK opened 3 years ago

C0DK commented 3 years ago

if you set

__unittest = True

in your various files, then the stackstrace in unittest (and others) will skip references in that file.

This means that i would only see the entry-point to your framework rather than this whole stacktrace: image

C0DK commented 3 years ago

https://github.com/python/cpython/blob/3.7/Lib/unittest/suite.py#L8

https://stackoverflow.com/questions/24402456/py-test-hide-stacktrace-lines-from-unittest-module#comment59252681_24679193

https://stackoverflow.com/a/53310018

Just to provide examples and the source