Skip to content

Commit

Permalink
add test for fromxlsx(read_only=True)
Browse files Browse the repository at this point in the history
  • Loading branch information
juarezr committed Sep 11, 2020
1 parent 1b306e0 commit 8632cdf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions petl/test/io/test_xlsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ def test_fromxlsx():
ieq(expect, tbl)
ieq(expect, tbl)

def test_fromxlsx_read_only():
filename = pkg_resources.resource_filename(
'petl', 'test/resources/test.xlsx'
)
tbl = fromxlsx(filename, sheet='Sheet1', read_only=True)
expect = (('foo', 'bar'),
('A', 1),
('B', 2),
('C', 2),
(u'é', datetime(2012, 1, 1)))
ieq(expect, tbl)
ieq(expect, tbl)

def test_fromxlsx_nosheet():
filename = pkg_resources.resource_filename(
'petl', 'test/resources/test.xlsx'
Expand Down

0 comments on commit 8632cdf

Please sign in to comment.