From db8ca7a5eb461a3b1c165407a731fb4a71a199fe Mon Sep 17 00:00:00 2001 From: Jocelyn Boullier Date: Tue, 2 Mar 2021 21:37:57 +0100 Subject: tests: add additional test about ToC, this time with arXiv provider --- tests/test_providers.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_providers.py b/tests/test_providers.py index 9eec83b..af69c64 100644 --- a/tests/test_providers.py +++ b/tests/test_providers.py @@ -450,6 +450,14 @@ class TestProviders(unittest.TestCase): with pdf.open_outline() as outline: assert len(outline.root) > 0 + def test_arxiv_copy_toc(self): + """Make sure the table of content is kept after processing when using the arXiv provider.""" + prov = Arxiv(upload=False, verbose=VERBOSE) + filename = prov.run("https://arxiv.org/abs/1711.03512") + with Pdf.open(filename) as pdf: + with pdf.open_outline() as outline: + assert len(outline.root) > 0 + if __name__ == "__main__": unittest.main() -- cgit v1.2.3