Skip to content

Commit 0524e27

Browse files
committed
✨ test append two dimensinal array as a new sheet. #56
1 parent 92d453d commit 0524e27

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_book.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,17 @@ def test_create_new_sheet():
3232
data = get_data(test_file)
3333
eq_(data["alien"], [["Test"]])
3434
os.unlink(test_file)
35+
36+
37+
def test_create_append_new_data():
38+
test_file = "book_test.xlsx"
39+
book = Book(os.path.join("tests", "fixtures", "date_field.xlsx"))
40+
sheet = book["alien"]
41+
sheet.append([1, 2, 3])
42+
sheet.append([3, 4, 5])
43+
book.save(test_file)
44+
book.close()
45+
46+
data = get_data(test_file)
47+
eq_(data["alien"], [[1, 2, 3], [3, 4, 5]])
48+
os.unlink(test_file)

0 commit comments

Comments
 (0)