Certan tools like pytest and other things mess with the value of sys.stderr. If we import progressbar before pytest has messed with it, then ProgressBar's default fd value will remain unmessed-with, potentially causing test failures if we're trying to test our progressbar output.
Certan tools like pytest and other things mess with the value of
sys.stderr
. If we import progressbar before pytest has messed with it, thenProgressBar
's defaultfd
value will remain unmessed-with, potentially causing test failures if we're trying to test our progressbar output.