Skip to content
This repository was archived by the owner on Apr 11, 2025. It is now read-only.

Commit 713bfc0

Browse files
ollynowellbosd
authored andcommitted
Add test case for the bugfix
1 parent 49f61b8 commit 713bfc0

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

tests/data.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2845,6 +2845,49 @@
28452845
["", "", "", "", "", "LSD (0.10) =", "5.7", "0.3", "ns", "37.8", "566.4"],
28462846
]
28472847

2848+
data_stream_inner_outer_columns = [
2849+
[
2850+
"Outer 1",
2851+
"Outer 2",
2852+
"Long 1",
2853+
"Long 2",
2854+
"Inner",
2855+
"Long 3",
2856+
],
2857+
[
2858+
"A1",
2859+
"B1",
2860+
"C1",
2861+
"D1",
2862+
"E1",
2863+
"F1",
2864+
],
2865+
[
2866+
"",
2867+
"",
2868+
"C2",
2869+
"D2",
2870+
"",
2871+
"F2",
2872+
],
2873+
[
2874+
"",
2875+
"",
2876+
"C3",
2877+
"D3",
2878+
"",
2879+
"F3",
2880+
],
2881+
[
2882+
"",
2883+
"",
2884+
"C4",
2885+
"D4",
2886+
"",
2887+
"F4",
2888+
],
2889+
]
2890+
28482891
data_lattice = [
28492892
[
28502893
"Cycle \nName",
15 KB
Binary file not shown.

tests/test_stream.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,14 @@ def test_stream_duplicated_text(testdir):
123123
filename = os.path.join(testdir, "birdisland.pdf")
124124
tables = camelot.read_pdf(filename, flavor="stream")
125125
assert_frame_equal(df, tables[0].df)
126+
127+
128+
def test_stream_inner_outer_columns(testdir):
129+
df = pd.DataFrame(data_stream_inner_outer_columns)
130+
131+
filename = os.path.join(testdir, "stream_inner_outer_columns.pdf")
132+
tables = camelot.read_pdf(
133+
filename,
134+
flavor="stream",
135+
)
136+
assert_frame_equal(df, tables[0].df)

0 commit comments

Comments
 (0)