Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix testing: add flush() to the Tee class #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 25, 2023

  1. Fix testing: add flush() to the Tee class

    The Tee class is used as stdout-like object, but
    it was missing the flush method. That method is called
    by some code which is replaced by instances of Tee,
    leading to errors:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
        self.test(*self.arg)
      File "<...>/tests/test_options.py", line 94, in test_old_var_compatibility
        p.program('export', {'--template': 'foobar-%s-1234.pot'})
      [...]
      File "/usr/lib/python3/dist-packages/colorama/ansitowin32.py", line 177, in write
        self.write_and_convert(text)
      File "/usr/lib/python3/dist-packages/colorama/ansitowin32.py", line 202, in write_and_convert
        self.write_plain_text(text, cursor, start)
      File "/usr/lib/python3/dist-packages/colorama/ansitowin32.py", line 211, in write_plain_text
        self.wrapped.flush()
        ^^^^^^^^^^^^^^^^^^
    AttributeError: 'Tee' object has no attribute 'flush'
    tosky committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    15a462d View commit details
    Browse the repository at this point in the history