Skip to content

9.0.0 outputs control characters with '---color=no' #13972

Closed

Description

@lhupfeldt

When running pytest >=9.0.0 in emacs compilation mode I get:

test/lib/logging_filters_test.py �]9;4;1;36�\.�]9;4;1;36�\.          [ 36%]

Adding --color=no has no effect.

Pre 9.0.0 I get

test/lib/logging_filters_test.py ..                       [ 36%]

Adding --color=no is not required.

Activity

  1. jatimix commented on Nov 18, 2025

    @jatimix

    Same issue here.

    Seems comming from #13728 which added some code to support terminal progress
    in emacs the $TERM usually point to "dumb", could it be related ?

    tests/api/gk_do/test_images.py .�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\.�]9;4;1;0�\  C-c C-c�]9;4;0;�\
    
  2. bluetech commented on Nov 18, 2025

    @bluetech
    Member

    If the problem is the terminal progress, then it will be resolved by #13971. If you're looking for a workaround until the next point release, you can use -p no:terminalprogress.

    Although we should test that the TERM is not dumb as well, this way it won't have this issue even if explicitly enabled. I forgot about that, so thanks for reporting. I will add that to #13971.

  3. lhupfeldt commented on Nov 19, 2025

    @lhupfeldt
    Author

    It is correct that TERM=dumb in EMACS comilation mode.

    I have tried with --color=yes and -p no:terminalprogress, I have the EMACS ansi-color plugin enabled in the compilation buffer. This makes it work.

    The terminal width is not interpreted correctly though, a window resize after pytest has been started fixes that.
    Image
    The initial terminal width was as wide as the final one, I made the window smaller end larger again.
    The terminal with issue is not new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions