diff options
Diffstat (limited to 'core/TESTS')
-rw-r--r-- | core/TESTS/test_imports.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/core/TESTS/test_imports.py b/core/TESTS/test_imports.py index b4838f6..238523a 100644 --- a/core/TESTS/test_imports.py +++ b/core/TESTS/test_imports.py @@ -152,9 +152,12 @@ class SubprocessTest(TestCase): TROGGLE_PATH = Path(settings.REPOS_ROOT_PATH) / "troggle" for cwd in [settings.SURVEX_DATA, settings.EXPOWEB, settings.DRAWINGS_DATA, TROGGLE_PATH]: sp = subprocess.run([settings.GIT, "status"], cwd=cwd, capture_output=True, text=True) - print(f'git output: {cwd}:\n # {sp.stderr=}\n # {sp.stdout=} \n # return code: {str(sp.returncode)}') + out = str(sp.stdout) + if len(out) > 160: + out = out[:75] + "\n <Long output curtailed>\n" + out[-75:] + print(f'git output: {cwd}:\n # {sp.stderr=}\n # sp.stdout={out} \n # return code: {str(sp.returncode)}') if sp.returncode != 0: - print(f'git output: {cwd}:\n # {sp.stderr=}\n # {sp.stdout=} \n # return code: {str(sp.returncode)}') + print(f'git output: {cwd}:\n # {sp.stderr=}\n # sp.stdout={out} \n # return code: {str(sp.returncode)}') self.assertTrue( sp.returncode == 0, f'{cwd} - git is unhappy') @@ -180,9 +183,12 @@ class SubprocessTest(TestCase): cwd = settings.SURVEX_DATA for survey in ["1623.svx", "1626.svx"]: sp = subprocess.run([settings.CAVERN, survey], cwd=cwd, capture_output=True, text=True) - print(f'survex output: {cwd}:\n # {sp.stderr=}\n # {sp.stdout=} \n # return code: {str(sp.returncode)}') + out = str(sp.stdout) + if len(out) > 160: + out = out[:75] + "\n <Long output curtailed>\n" + out[-75:] + # print(f'survex output: {cwd}:\n # {sp.stderr=}\n # sp.stdout={out} \n # return code: {str(sp.returncode)}') if sp.returncode != 0: - print(f'survex output: {cwd}:\n # {sp.stderr=}\n # {sp.stdout=} \n # return code: {str(sp.returncode)}') + print(f'survex output: {cwd}:\n # {sp.stderr=}\n # sp.stdout={out} \n # return code: {str(sp.returncode)}') self.assertTrue( sp.returncode == 0, f'{cwd} - survex is unhappy') |