Add lattice test
parent
eaca147b9d
commit
d064f716e9
|
|
@ -427,6 +427,13 @@ data_lattice_two_tables_2 = [
|
||||||
["Pooled", "23889", "47.7", "1.5", "9.9", "19.9", "17.8", "3.3"]
|
["Pooled", "23889", "47.7", "1.5", "9.9", "19.9", "17.8", "3.3"]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
data_lattice_table_regions = [
|
||||||
|
['Età dell’Assicurato \nall’epoca del decesso', 'Misura % di \nmaggiorazione'],
|
||||||
|
['18-75', '1,00%'],
|
||||||
|
['76-80', '0,50%'],
|
||||||
|
['81 in poi', '0,10%']
|
||||||
|
]
|
||||||
|
|
||||||
data_lattice_table_areas = [
|
data_lattice_table_areas = [
|
||||||
["", "", "", "", "", "", "", "", ""],
|
["", "", "", "", "", "", "", "", ""],
|
||||||
["State", "n", "Literacy Status", "", "", "", "", "", ""],
|
["State", "n", "Literacy Status", "", "", "", "", "", ""],
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -159,6 +159,14 @@ def test_lattice_two_tables():
|
||||||
assert df2.equals(tables[1].df)
|
assert df2.equals(tables[1].df)
|
||||||
|
|
||||||
|
|
||||||
|
def test_lattice_table_regions():
|
||||||
|
df = pd.DataFrame(data_lattice_table_regions)
|
||||||
|
|
||||||
|
filename = os.path.join(testdir, "table_region.pdf")
|
||||||
|
tables = camelot.read_pdf(filename, table_regions=["170,370,560,270"])
|
||||||
|
assert df.equals(tables[0].df)
|
||||||
|
|
||||||
|
|
||||||
def test_lattice_table_areas():
|
def test_lattice_table_areas():
|
||||||
df = pd.DataFrame(data_lattice_table_areas)
|
df = pd.DataFrame(data_lattice_table_areas)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue