Support @example(...).via("string description")
to track example provenance
#3506
Labels
interop
how to play nicely with other packages
Over in Zac-HD/hypofuzz#13, I mention using magic comments to track which
@example()
cases were automatically added by the fuzzer, to enably fully-automated maintanence of a static covering set.It occured to me that provenance tracking might be a more generally desirable feature, and that a simple method which returns
self
might be a better way to implement this than comments. Once I hit on the short-and-sweet namevia
, I was sold. Probably requires some use oftyping.Protocol
to help type-checking tools understand that this is fine, with corresponding compatibility workaround on Python 3.7 (which predatesProtocol
). The resulting code might look like:The text was updated successfully, but these errors were encountered: