Skip to content

Commit

Permalink
Add test for where columns are given as tuple, rather than list.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbubley committed May 20, 2024
1 parent 362ac06 commit df3ba02
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_read_pdf_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ def test_read_pdf_with_columns(self):
)[0].equals(pd.read_csv(expected_csv))
)

def test_read_pdf_with_tuple_columns(self):
pdf_path = "tests/resources/campaign_donors.pdf"
expected_csv = "tests/resources/campaign_donors.csv"
self.assertTrue(
tabula.read_pdf(
pdf_path, columns=(47, 147, 256, 310, 375, 431, 504), guess=False
)[0].equals(pd.read_csv(expected_csv))
)

def test_read_pdf_with_relative_columns(self):
pdf_path = "tests/resources/campaign_donors.pdf"
expected_csv = "tests/resources/campaign_donors.csv"
Expand Down

0 comments on commit df3ba02

Please sign in to comment.