Merge 647e4d26a8 into f43235934b
commit
6d0fd601db
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import warnings
|
import warnings
|
||||||
|
from camelot.utils import is_url
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import camelot
|
import camelot
|
||||||
|
|
||||||
|
|
||||||
testdir = os.path.dirname(os.path.abspath(__file__))
|
testdir = os.path.dirname(os.path.abspath(__file__))
|
||||||
testdir = os.path.join(testdir, "files")
|
testdir = os.path.join(testdir, "files")
|
||||||
filename = os.path.join(testdir, "foo.pdf")
|
filename = os.path.join(testdir, "foo.pdf")
|
||||||
|
|
@ -118,3 +118,7 @@ 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_invalid_url():
|
||||||
|
url = 'fttp://google.com/pdf'
|
||||||
|
assert is_url(url) == False
|
||||||
Loading…
Reference in New Issue