示例#1
0
文件: test_cr.py 项目: wrobell/piuml
 def test_head_size(self):
     """
     Test head size
     """
     style = BoxStyle()
     style.size = Size(80, 25)
     style.compartment[0] = 10
     self.assertEquals(25, _head_size(style))
示例#2
0
文件: test_cr.py 项目: wrobell/piuml
 def test_head_size_with_one_cmp(self):
     """
     Test head size with one additional compartment
     """
     style = BoxStyle()
     style.size = Size(80, 55)
     style.compartment[0] = 10
     style.compartment.append(15)
     self.assertEquals(30, _head_size(style)) # 55 - 5 * 2 (pad) - 15
示例#3
0
文件: test_cr.py 项目: wrobell/piuml
 def test_head_size_with_two_cmp(self):
     """
     Test head size with two additional compartments
     """
     style = BoxStyle()
     style.size = Size(80, 100)
     style.compartment[0] = 10
     style.compartment.append(15)
     style.compartment.append(10)
     self.assertEquals(55, _head_size(style)) # 100 - 5 * 4 (pad) - 25