Replace cryptic test error messages with more informative ones

This commit is contained in:
James R. Barlow
2023-10-24 00:54:31 -07:00
parent 7ce9d08b2d
commit fadc0cf69b
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ from ocrmypdf.builtin_plugins import ghostscript
def raise_gs_fail(*args, **kwargs):
raise CalledProcessError(
1, 'gs', output=b"", stderr=b"ERROR: Ghost story archive not found"
1, 'gs', output=b"", stderr=b"TEST ERROR: gs_raster_failure.py"
)
+1 -1
View File
@@ -12,7 +12,7 @@ from ocrmypdf.builtin_plugins import ghostscript
def raise_gs_fail(*args, **kwargs):
raise CalledProcessError(
1, 'gs', output=b"", stderr=b"ERROR: Casper is not a friendly ghost"
1, 'gs', output=b"", stderr=b"TEST ERROR: gs_render_failure.py"
)
+2 -2
View File
@@ -84,7 +84,7 @@ def test_gs_render_failure(resources, outpdf):
'--plugin',
'tests/plugins/gs_render_failure.py',
)
assert 'Casper is not a friendly ghost' in p.stderr
assert 'TEST ERROR: gs_render_failure.py' in p.stderr
assert p.returncode == ExitCode.child_process_error
@@ -97,7 +97,7 @@ def test_gs_raster_failure(resources, outpdf):
'--plugin',
'tests/plugins/gs_raster_failure.py',
)
assert 'Ghost story archive not found' in p.stderr
assert 'TEST ERROR: gs_raster_failure.py' in p.stderr
assert p.returncode == ExitCode.child_process_error