test for invalid url

pull/251/head
Mohan Kumar 2021-07-09 13:29:29 +05:30
parent f43235934b
commit 680b0f3fe9
1 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,6 @@ import pytest
import camelot
testdir = os.path.dirname(os.path.abspath(__file__))
testdir = os.path.join(testdir, "files")
filename = os.path.join(testdir, "foo.pdf")
@ -118,3 +117,9 @@ def test_bad_password():
message = "file has not been decrypted"
with pytest.raises(Exception, match=message):
tables = camelot.read_pdf(filename, password="wrongpass")
def test_invalid_url():
url = 'fttp://google.com/pdf'
message = "File format not supported"
with pytest.raises(Exception, match=message):
url = camelot.read_pdf(url)