From 6233bbd6ed2f47c75522b17c6c2099a50cdd00fb Mon Sep 17 00:00:00 2001 From: Jeremy Singer-Vine Date: Sat, 29 Aug 2020 13:35:47 -0400 Subject: [PATCH] Speed up test_ca_warn_report:test_objects The same goals can be acheived by just testing the first page, instead of the entire PDF, trimming approximately 20% off the total test suite's execution time, although YMMV. --- tests/test_ca_warn_report.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_ca_warn_report.py b/tests/test_ca_warn_report.py index f152e178..11fe9c99 100644 --- a/tests/test_ca_warn_report.py +++ b/tests/test_ca_warn_report.py @@ -31,9 +31,10 @@ def test_page_limiting(self): assert pdf.pages[1].page_number == 3 def test_objects(self): - assert len(self.pdf.chars) - assert len(self.pdf.rects) - assert len(self.pdf.images) + p = self.pdf.pages[0] + assert len(p.chars) + assert len(p.rects) + assert len(p.images) def test_parse(self):