コード例 #1
0
ファイル: models.py プロジェクト: varikin/dali
 def test_get_viewable_size_portrait(self):
     w, h = _get_viewable_size(800, 1000)
     self.assertEquals(400, h, 'The height is not correct')
     self.assertEquals(320, w, 'The width is not correct')
コード例 #2
0
ファイル: models.py プロジェクト: varikin/dali
 def test_get_viewable_size_square(self):
     w, h = _get_viewable_size(832, 832)
     self.assertEquals(w, h, 'The width is not equal to the height')
コード例 #3
0
ファイル: models.py プロジェクト: varikin/dali
 def test_get_viewable_size_landscape(self):
     w, h = _get_viewable_size(1000, 800)
     self.assertEquals(320, h, 'The height is not correct')
     self.assertEquals(400, w, 'The width is not correct')