pytask icon indicating copy to clipboard operation
pytask copied to clipboard

ENH: Disable capturing from inside a task

Open augustebaum opened this issue 3 years ago • 1 comments

Is your feature request related to a problem?

I wish pytask had the same "capture-related" fixtures as pytest, like the ones described here. In particular I'd like to be able to use the

with capsys.disabled():
    ...

behaviour, in the hope that tqdm progress bars don't break when using the -s flag.

Describe the solution you'd like

I don't know precisely how pytask differs from pytest, but perhaps it would be possible to just re-use the above mentioned fixtures from pytest?

API breaking implications

Hopefully none, this is just adding fixtures.

Describe alternatives you've considered

None so far ^^'; I can track the progress of my task in other ways so I haven't pursued this very far.

augustebaum avatar Nov 26 '22 17:11 augustebaum

Hi @augustebaum, currently, there is no fixture mechanism in pytask and I still have to come up with a plan for implementation. But, it should be implemented at some point. And starting with capturing seems like a good idea since it is more internal. In the meantime, maybe pytask -v 0 -s also helps as a workaround.

tobiasraabe avatar Nov 30 '22 10:11 tobiasraabe