mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2026-01-08 05:02:39 +00:00
Fix test invalidated by Python 3.6 logging fixes
This commit is contained in:
parent
24da92d39e
commit
ef1ef1cdf0
@ -296,7 +296,6 @@ def test_metadata_fixup_warning(resources, outdir, caplog):
|
||||
copyfile(resources / 'graph.pdf', outdir / 'graph.pdf')
|
||||
|
||||
context = PDFContext(options, outdir, outdir / 'graph.pdf', None)
|
||||
context.log = logging.getLogger()
|
||||
metadata_fixup(working_file=outdir / 'graph.pdf', context=context)
|
||||
for record in caplog.records:
|
||||
assert record.levelname != 'WARNING'
|
||||
@ -308,7 +307,6 @@ def test_metadata_fixup_warning(resources, outdir, caplog):
|
||||
graph.save(outdir / 'graph_mod.pdf')
|
||||
|
||||
context = PDFContext(options, outdir, outdir / 'graph_mod.pdf', None)
|
||||
context.log = logging.getLogger()
|
||||
metadata_fixup(working_file=outdir / 'graph.pdf', context=context)
|
||||
assert any(record.levelname == 'WARNING' for record in caplog.records)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user