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

zsh-related tests fail when TERM variable is set to linux #496

Closed
ogayot opened this issue Aug 2, 2024 · 1 comment
Closed

zsh-related tests fail when TERM variable is set to linux #496

ogayot opened this issue Aug 2, 2024 · 1 comment

Comments

@ogayot
Copy link
Contributor

ogayot commented Aug 2, 2024

Hello,
Running the test-suite with TERM=linux causes issues with the zsh-related tests (see below). The TERM variable is set in the Ubuntu CI infrastructure, causing red tests for python-argcomplete.

excerpt:

======================================================================
FAIL: test_special_characters (test.test.TestZshGlobalImplicit.test_special_characters)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/olivier/dev/canonical/argcomplete/test/test.py", line 1261, in setUp
    self.assertEqual(output, "ready\r\n")
AssertionError: 'ready\r\n\x1b[m\x0f\x1b[27m\x1b[24m\x1b[J' != 'ready\r\n'
  ready
- 
+ 


======================================================================
FAIL: test_special_characters_double_quoted (test.test.TestZshGlobalImplicit.test_special_characters_double_quoted)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/olivier/dev/canonical/argcomplete/test/test.py", line 1261, in setUp
    self.assertEqual(output, "ready\r\n")
AssertionError: 'ready\r\n\x1b[m\x0f\x1b[27m\x1b[24m\x1b[J' != 'ready\r\n'
  ready
- 
+ 


======================================================================
FAIL: test_special_characters_single_quoted (test.test.TestZshGlobalImplicit.test_special_characters_single_quoted)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/olivier/dev/canonical/argcomplete/test/test.py", line 1261, in setUp
    self.assertEqual(output, "ready\r\n")
AssertionError: 'ready\r\n\x1b[m\x0f\x1b[27m\x1b[24m\x1b[J' != 'ready\r\n'
  ready
- 
+ 


======================================================================
FAIL: test_unquoted_space (test.test.TestZshGlobalImplicit.test_unquoted_space)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/olivier/dev/canonical/argcomplete/test/test.py", line 1261, in setUp
    self.assertEqual(output, "ready\r\n")
AssertionError: 'ready\r\n\x1b[m\x0f\x1b[27m\x1b[24m\x1b[J' != 'ready\r\n'
  ready
- 
+ 


======================================================================
FAIL: test_wordbreak_chars (test.test.TestZshGlobalImplicit.test_wordbreak_chars)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/olivier/dev/canonical/argcomplete/test/test.py", line 1261, in setUp
    self.assertEqual(output, "ready\r\n")
AssertionError: 'ready\r\n\x1b[m\x0f\x1b[27m\x1b[24m\x1b[J' != 'ready\r\n'
  ready
- 
+ 

Link to full report https://autopkgtest.ubuntu.com/results/autopkgtest-oracular/oracular/amd64/p/python-argcomplete/20240801_161300_87da0@/log.gz

Since we are already setting setting the PS1 variable in the test-suite, I suggest we also set the TERM variable.

I will open a PR.

Thanks,
Olivier

@ogayot
Copy link
Contributor Author

ogayot commented Aug 5, 2024

Fixed in #497

@ogayot ogayot closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant