Unit Testing - Squelching Print Statements
Unit Testing - Squelching Print Statements
I'm running unit tests within the unix port and some functions generate output via print. Is there a way to temporarily disable standard output from within the micropython environment, or redirect one output to another? I see sys.stderr and sys.stdout but it's not obvious how to manipulate them.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Unit Testing - Squelching Print Statements
Is print(data, file=f) any help?
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.