str0zzapreti / pytest-retry

A simple plugin for retrying flaky tests in CI environments
MIT License
27 stars 6 forks source link

use verbosity count for trace limit rather than binary on off #41

Closed str0zzapreti closed 2 months ago

str0zzapreti commented 2 months ago

By default, pytest-retry records exceptions with a trace depth of 1. Pytest provides a verbosity option (note, Pytest only uses the verbosity command as an on/off switch, but records a counter for optional use by plugins). This change allows for increased control over trace length when verbose mode is enabled as previously, the trace limit would simply be disabled in this case. Now, trace depth should track to verbosity levels 1-4, with 5 producing the original unlimited trace behavior.