Closed jdgsmallwood closed 1 month ago
The logic differences between the "started" and "done" messages was intentional. We only want to show the "started" message when the Wait Bar is disabled. However, we want to show the "done" message more often; that includes when the Wait Bar is disabled but also any time a Wait Bar is not transient.
For this issue, I think we need to understand why isatty()
is returning True
in Pytest on Windows. The expectation is the tests run without a perceived TTY.
Thanks for the input Russell, I've got an alternative solution which utilizes os.isatty and this appears to behave on all platforms. I'm continuing to explore why there is a difference between
os.isatty(sys.__stdout__.fileno()) # returns correct expected result
sys.__stdout__.isatty() # erroneous
on pytest on Windows 11.
Fixes #1805
The test suite failed on Windows 11 on a clean install due to the wrong number of log messages being captured by capsys.
Windows 11 was responding true to the
call in the pytest session, and due to the different logic gates around the "started" and "outcome" messages in briefcase/console.py lines 591-629, only the "outcome" message was logged.
This change aligns the logic between the "started" and "outcome" messages to ensure the suite passes on Windows 11.
PR Checklist: