From 77aac68d8b50df0d63e3670755afad5c3e5c7eec Mon Sep 17 00:00:00 2001 From: Evan Date: Sat, 25 Nov 2023 21:23:16 +1100 Subject: [PATCH] Add sanity check to shell tests --- test/test.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test.py b/test/test.py index c89912a6..d94e55ac 100755 --- a/test/test.py +++ b/test/test.py @@ -8,6 +8,7 @@ import subprocess import sys import unittest +import unittest.util from io import StringIO from tempfile import NamedTemporaryFile, TemporaryFile, mkdtemp @@ -33,6 +34,9 @@ from argcomplete.completers import DirectoriesCompleter, FilesCompleter, SuppressCompleter # noqa: E402 from argcomplete.lexers import split_line # noqa: E402 +# Default max length is insufficient for troubleshooting. +unittest.util._MAX_LENGTH = 1000 + IFS = "\013" COMP_WORDBREAKS = " \t\n\"'><=;|&(:" @@ -1239,12 +1243,16 @@ def test_comp_point(self): class TestBashZshBase(TestShellBase): + maxDiff = None + # 'dummy' argument unused; checks multi-command registration works # by passing 'prog' as the second argument. install_cmd = 'eval "$(register-python-argcomplete dummy prog)"' def setUp(self): sh = self.repl_provider() + output = sh.run_command("echo ready") + self.assertEqual(output, "ready\r\n") path = ":".join([os.path.join(BASE_DIR, "scripts"), TEST_DIR, "$PATH"]) sh.run_command("export PATH={0}".format(path)) sh.run_command("export PYTHONPATH={0}".format(BASE_DIR))