Closed veprbl closed 3 years ago
It looks like termios.tcflush(stream, termios.TCIFLUSH)
is not behaving as expected on MacOS.
You can see here where self.tty.clear()
is called after the counters are setup. This removes anything written to stdout on the mock TTY.
In tests.MockTTY.clear()
, termios.tcflush()
gets called
According to the man page this should behave the same in MacOS, but, there are a lot of undocumented "features" on Macs.
I don't have a Mac to test with, so I'll need your help on this. Can you try changing it from TCIFLUSH
to TCIOFLUSH
and let me know if that works. It does more than necessary, but might provide the functionality we need.
If that doesn't work, I'm tempted just to skip this test on Macs. The alternative is to read the number of lines produced by the setup. This is done in other places in the code, but I'm trying to get away from that because it's harder to maintain.
I don't have a Mac to test with, so I'll need your help on this. Can you try changing it from
TCIFLUSH
toTCIOFLUSH
and let me know if that works. It does more than necessary, but might provide the functionality we need.
That worked like a charm. Let me know if you need to try something else.
Fix is now in the master branch. So your original workflow should succeed now. Thanks for your help!
Describe the bug A following test fails on macOS, but not on linux (with the same dependency versions)
To Reproduce
Environment (please complete the following information):