Skip to content

Commit ef5bf64

Browse files
committed
Test for GitHub issue #585.
This test checks that Camelot can successfully extract tables when using the 'network' flavor with specified 'table_areas' and 'columns', ensuring that at least one table is detected.
1 parent 6b7b67d commit ef5bf64

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/test_network.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,27 @@ def test_network_no_infinite_execution(testdir):
155155
)
156156

157157
assert len(tables) >= 1
158+
159+
160+
# Reported as https://github.com/camelot-dev/camelot/issues/585
161+
def test_issue_585(testdir):
162+
"""Test for GitHub issue #585.
163+
164+
This test checks that Camelot can successfully extract tables when using
165+
the 'network' flavor with specified 'table_areas' and 'columns',
166+
ensuring that at least one table is detected.
167+
168+
Parameters
169+
----------
170+
testdir : str
171+
The path to the test directory.
172+
173+
"""
174+
filename = os.path.join(testdir, "multiple_tables.pdf")
175+
tables = camelot.read_pdf(
176+
filename,
177+
flavor="network",
178+
table_areas=["100,700,500,100"],
179+
columns=["150,200,250,300,350,400,450,500"],
180+
)
181+
assert len(tables) > 0

0 commit comments

Comments
 (0)