def test_1sourcerow(self):
     
     srow,erow = ssviewer_utils._getpage(['a'],30,1)
     
     self.assertEqual(srow,0)
     self.assertEqual(erow,0)
 def test_page_too_high(self):
     
     srow,erow = ssviewer_utils._getpage(self.grid,5,5)
     
     self.assertEqual(srow,12)
     self.assertEqual(erow,16)
 def test_pagelen_2(self):
     
     srow,erow = ssviewer_utils._getpage(self.grid,2,2)
     
     self.assertEqual(srow,2)
     self.assertEqual(erow,3)
 def test_page_last(self):
     
     srow,erow = ssviewer_utils._getpage(self.grid,5,4)
     
     self.assertEqual(srow,15)
     self.assertEqual(erow,16)
 def test_numrows_less_than1page(self):
     
     srow,erow = ssviewer_utils._getpage(self.grid,20,1)
     
     self.assertEqual(srow,0)
     self.assertEqual(erow,16)
 def test_(self):
     
     srow,erow = ssviewer_utils._getpage(self.grid,5,1)
     
     self.assertEqual(srow,0)
     self.assertEqual(erow,4)
 def test_page2(self):
     
     srow,erow = ssviewer_utils._getpage(self.grid,5,2)
     
     self.assertEqual(srow,5)
     self.assertEqual(erow,9)
Esempio n. 8
0
    def test_pagelen_2(self):

        srow, erow = ssviewer_utils._getpage(self.grid, 2, 2)

        self.assertEqual(srow, 2)
        self.assertEqual(erow, 3)
Esempio n. 9
0
    def test_1sourcerow(self):

        srow, erow = ssviewer_utils._getpage(['a'], 30, 1)

        self.assertEqual(srow, 0)
        self.assertEqual(erow, 0)
Esempio n. 10
0
    def test_page_too_high(self):

        srow, erow = ssviewer_utils._getpage(self.grid, 5, 5)

        self.assertEqual(srow, 12)
        self.assertEqual(erow, 16)
Esempio n. 11
0
    def test_numrows_less_than1page(self):

        srow, erow = ssviewer_utils._getpage(self.grid, 20, 1)

        self.assertEqual(srow, 0)
        self.assertEqual(erow, 16)
Esempio n. 12
0
    def test_page_last(self):

        srow, erow = ssviewer_utils._getpage(self.grid, 5, 4)

        self.assertEqual(srow, 15)
        self.assertEqual(erow, 16)
Esempio n. 13
0
    def test_page2(self):

        srow, erow = ssviewer_utils._getpage(self.grid, 5, 2)

        self.assertEqual(srow, 5)
        self.assertEqual(erow, 9)
Esempio n. 14
0
    def test_(self):

        srow, erow = ssviewer_utils._getpage(self.grid, 5, 1)

        self.assertEqual(srow, 0)
        self.assertEqual(erow, 4)