Add flavors
This commit is contained in:
@@ -18,11 +18,11 @@ def test_stream_table_rotated():
|
||||
df = pd.DataFrame(data_stream_table_rotated)
|
||||
|
||||
filename = os.path.join(testdir, "clockwise_table_2.pdf")
|
||||
tables = camelot.read_pdf(filename)
|
||||
tables = camelot.read_pdf(filename, flavor="stream")
|
||||
assert df.equals(tables[0].df)
|
||||
|
||||
filename = os.path.join(testdir, "anticlockwise_table_2.pdf")
|
||||
tables = camelot.read_pdf(filename)
|
||||
tables = camelot.read_pdf(filename, flavor="stream")
|
||||
assert df.equals(tables[0].df)
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ def test_stream_table_area():
|
||||
df = pd.DataFrame(data_stream_table_area_single)
|
||||
|
||||
filename = os.path.join(testdir, "tabula/us-007.pdf")
|
||||
tables = camelot.read_pdf(filename, table_area=["320,500,573,335"])
|
||||
tables = camelot.read_pdf(filename, flavor="stream", table_area=["320,500,573,335"])
|
||||
assert df.equals(tables[0].df)
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ def test_stream_columns():
|
||||
|
||||
filename = os.path.join(testdir, "mexican_towns.pdf")
|
||||
tables = camelot.read_pdf(
|
||||
filename, columns=["67,180,230,425,475"], row_close_tol=10)
|
||||
filename, flavor="stream", columns=["67,180,230,425,475"], row_close_tol=10)
|
||||
assert df.equals(tables[0].df)
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ def test_lattice():
|
||||
|
||||
filename = os.path.join(testdir,
|
||||
"tabula/icdar2013-dataset/competition-dataset-us/us-030.pdf")
|
||||
tables = camelot.read_pdf(filename, pages="2", mesh=True)
|
||||
tables = camelot.read_pdf(filename, pages="2")
|
||||
assert df.equals(tables[0].df)
|
||||
|
||||
|
||||
@@ -56,11 +56,11 @@ def test_lattice_table_rotated():
|
||||
df = pd.DataFrame(data_lattice_table_rotated)
|
||||
|
||||
filename = os.path.join(testdir, "clockwise_table_1.pdf")
|
||||
tables = camelot.read_pdf(filename, mesh=True)
|
||||
tables = camelot.read_pdf(filename)
|
||||
assert df.equals(tables[0].df)
|
||||
|
||||
filename = os.path.join(testdir, "anticlockwise_table_1.pdf")
|
||||
tables = camelot.read_pdf(filename, mesh=True)
|
||||
tables = camelot.read_pdf(filename)
|
||||
assert df.equals(tables[0].df)
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ def test_lattice_process_background():
|
||||
df = pd.DataFrame(data_lattice_process_background)
|
||||
|
||||
filename = os.path.join(testdir, "background_lines_1.pdf")
|
||||
tables = camelot.read_pdf(filename, mesh=True, process_background=True)
|
||||
tables = camelot.read_pdf(filename, process_background=True)
|
||||
assert df.equals(tables[1].df)
|
||||
|
||||
|
||||
@@ -76,5 +76,5 @@ def test_lattice_copy_text():
|
||||
df = pd.DataFrame(data_lattice_copy_text)
|
||||
|
||||
filename = os.path.join(testdir, "row_span_1.pdf")
|
||||
tables = camelot.read_pdf(filename, mesh=True, line_size_scaling=60, copy_text="v")
|
||||
tables = camelot.read_pdf(filename, line_size_scaling=60, copy_text="v")
|
||||
assert df.equals(tables[0].df)
|
||||
Reference in New Issue
Block a user