Hypothesis may generate cycles between branch aliases in snapshots strategy so
prevent to encounter such cases in tests using it.
Clarify the last post processing step of the snapshots strategy by adding a comment.
Differential D2383
hypothesis_strategies/snapshots: Explain last post-processing step anlambert on Dec 2 2019, 2:31 PM. Authored by
Details
Clarify the last post processing step of the snapshots strategy by adding a comment.
Diff Detail
Event TimelineComment Actions Build is green Comment Actions Update: Need to test against 'alias' instead of TargetType.ALIAS to avoid hypothesis.errors.Flaky Comment Actions Build is green Comment Actions Cycle detection in snapshots is supposed to be handled in the snapshot_identifier function; that's why it's called in a loop when generating the snapshot id. If there's a bug here it should be fixed in that function (and a regression test should be added). Comment Actions We should also add a comment in the id generation to explain that we're using the cycle detection feature, because that's not obvious at all here. Comment Actions Oh I see, I need to dig further on this then.
Indeed, I thought it was related to another error I did not know of. I will update accordingly. Comment Actions
Turns out I can not reproduce anymore the cycles issue I encountered so I must have introduced it by hacking on the strategy implementation. Initially I stumbled across aliases chain in the snapshot content generated by hypothesis that was making a test failed for swh-web So I will simply update that diff to add the comment about the cycles detection in the strategy. Comment Actions Update: There was no cycles generation between aliases issue after all, probably myself that messed up somewhere So modify that diff to simply add a comment in the strategy implementation to indicate the last post processing step Comment Actions Build is green |