TEST TO CHECK UNSUPPORTED URL

Added test to check if the error message is displayed accurately when an
unsupported url is passed
pull/249/head
akkuldn 2021-07-09 12:39:35 +05:30
parent f43235934b
commit a090e4d034
1 changed files with 6 additions and 0 deletions

View File

@ -118,3 +118,9 @@ def test_bad_password():
message = "file has not been decrypted" message = "file has not been decrypted"
with pytest.raises(Exception, match=message): with pytest.raises(Exception, match=message):
tables = camelot.read_pdf(filename, password="wrongpass") tables = camelot.read_pdf(filename, password="wrongpass")
def test_content_type():
url="https://camelot-py.readthedocs.io/en/master/_static/csv/foo.csv"
message = "File format not supported"
with pytest.raises(NotImplementedError, match=message):
tables = camelot.read_pdf(url)