diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-04-27 17:33:13 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-04-27 17:33:13 +0100 |
| commit | fb825cab2e4681a6e6cae8cf32adeeb880a4910c (patch) | |
| tree | 075e870df311b6113701b719fcf0b5d06e1fb542 | |
| parent | Use builtin iter() function to find img elements (diff) | |
| download | paper2remarkable-fb825cab2e4681a6e6cae8cf32adeeb880a4910c.tar.gz paper2remarkable-fb825cab2e4681a6e6cae8cf32adeeb880a4910c.zip | |
Add unit test for this bug
| -rw-r--r-- | tests/test_providers.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_providers.py b/tests/test_providers.py index e0239ed..0787792 100644 --- a/tests/test_providers.py +++ b/tests/test_providers.py @@ -7,6 +7,7 @@ __author__ = "G.J.J. van den Burg" import hashlib import os +import pdfplumber import shutil import tempfile import unittest @@ -238,6 +239,15 @@ class TestProviders(unittest.TestCase): filename = prov.run(url) self.assertEqual(exp, os.path.basename(filename)) + def test_html_3(self): + prov = HTML(upload=False, verbose=VERBOSE) + url = "https://conclave-team.github.io/conclave-site/" + exp = "Conclave_Case_Study_-_A_Private_and_Secure_Real-Time_Collaborative_Text_Editor.pdf" + filename = prov.run(url) + self.assertEqual(exp, os.path.basename(filename)) + # this is a proxy test to check that all images are included + self.assertEqual(32, len(pdfplumber.open(filename).pages)) + if __name__ == "__main__": unittest.main() |
