diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_providers.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_providers.py b/tests/test_providers.py index eeaef82..70d012a 100644 --- a/tests/test_providers.py +++ b/tests/test_providers.py @@ -278,7 +278,10 @@ class TestProviders(unittest.TestCase): 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" + #exp = "Conclave_Case_Study_-_A_Private_and_Secure_Real-Time_Collaborative_Text_Editor.pdf" + # NOTE: Title differs between Readability.JS and readability-lxml, we + # assume that testing is done with Readability.JS + exp = "Conclave.pdf" filename = prov.run(url) self.assertEqual(exp, os.path.basename(filename)) # this is a proxy test to check that all images are included @@ -291,6 +294,13 @@ class TestProviders(unittest.TestCase): # this is a proxy test to check that all images are included self.assertEqual(4, len(pdfplumber.open(filename).pages)) + def test_html_5(self): + prov = HTML(upload=False, verbose=VERBOSE) + url = "https://www.spiegel.de/panorama/london-tausende-rechtsextreme-demonstranten-wollen-statuen-schuetzen-a-2a1ed9b9-708a-40dc-a5ff-f312e97a60ca#" + filename = prov.run(url) + # this is a proxy test to check that all images are included + self.assertEqual(4, len(pdfplumber.open(filename).pages)) + def test_semantic_scholar_1(self): prov = SemanticScholar(upload=False, verbose=VERBOSE) url = "https://pdfs.semanticscholar.org/1b01/dea77e9cbf049b4ee8b68dc4d43529d06299.pdf" @@ -320,5 +330,6 @@ class TestProviders(unittest.TestCase): self.assertEqual(exp, os.path.basename(filename)) + if __name__ == "__main__": unittest.main() |
