File: test_missing_records.py

package info (click to toggle)
python-xlrd 2.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,832 kB
  • sloc: python: 7,531; makefile: 118; sh: 7
file content (22 lines) | stat: -rw-r--r-- 658 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from unittest import TestCase

from xlrd import open_workbook
from xlrd.biffh import XL_CELL_TEXT

from .helpers import from_sample


class TestMissingRecords(TestCase):

    def setUp(self):
        path = from_sample('biff4_no_format_no_window2.xls')
        self.book = open_workbook(path)
        self.sheet = self.book.sheet_by_index(0)

    def test_default_format(self):
        cell = self.sheet.cell(0, 0)
        self.assertEqual(cell.ctype, XL_CELL_TEXT)

    def test_default_window2_options(self):
        self.assertEqual(self.sheet.cached_page_break_preview_mag_factor, 0)
        self.assertEqual(self.sheet.cached_normal_view_mag_factor, 0)