kislyuk / argcomplete

Python and tab completion, better together.
https://kislyuk.github.io/argcomplete/
Apache License 2.0
1.39k stars 129 forks source link

zsh tests failures on Gentoo #425

Closed mgorny closed 1 year ago

mgorny commented 1 year ago

When running the test suite on Gentoo, I'm getting 24 test failures. All of them seem to involve either of the two tracebacks (full log below):

======================================================================
FAIL: test_console_script_module (__main__.TestBashGlobal.test_console_script_module)
Test completing a console_script for a module.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/argcomplete/test/test.py", line 1150, in tearDown
    with self.assertRaises(pexpect.EOF):
AssertionError: EOF not raised

======================================================================
FAIL: test_comp_point (__main__.TestZsh.test_comp_point)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/argcomplete/test/test.py", line 1254, in setUp
    self.assertEqual(output, "")
AssertionError: '\x1b[0m\x1b[27m\x1b[24m\x1b[J' != ''
- 
+ 

Full test log: make-test.txt

It's against zsh-5.9. Tested on 3.0.6 (e6371200e4eb05ad312ac8370894201e0d53e890), via make test.

kislyuk commented 1 year ago

OK, it looks like your version of zsh is emitting a different ANSI escape sequence set for resetting the terminal before printing the prompt, compared to the ones I tested with. I updated the test suite to be more agnostic and just look for ESC[0m followed by ESC[J and ignore everything in between. Released in v3.0.7.

mgorny commented 1 year ago

Thanks. I really have no clue about ZFS, so I don't really know why it's doing that — but I can confirm that the test suite passes now.