Пример #1
0
 def testMillimeterConversion(self):
     got = document.valueToPixels('2mm')
     self.assertAlmostEqual(got, 5.67, places=2)
Пример #2
0
 def testInchConversion(self):
     got = document.valueToPixels('2in')
     self.assertEqual(got, 144)
Пример #3
0
 def testCentimeterConversion(self):
     got = document.valueToPixels('2cm')
     self.assertAlmostEqual(got, 56.7, places=1)
Пример #4
0
 def testDefault(self):
     got = document.valueToPixels("12")
     self.assertEqual(got, 12)
Пример #5
0
 def testPointConversion(self):
     got = document.valueToPixels('14pt')
     self.assertEqual(got, 14)
Пример #6
0
 def testMillimeterConversion(self):
     got = document.valueToPixels('2mm')
     self.assertAlmostEqual(got, 5.67, places=2)
Пример #7
0
 def testCentimeterConversion(self):
     got = document.valueToPixels('2cm')
     self.assertAlmostEqual(got, 56.7, places=1)
Пример #8
0
 def testInchConversion(self):
     got = document.valueToPixels('2in')
     self.assertEqual(got, 144)
Пример #9
0
 def testPointConversion(self):
     got = document.valueToPixels('14pt')
     self.assertEqual(got, 14)
Пример #10
0
 def testDefault(self):
     got = document.valueToPixels("12")
     self.assertEqual(got, 12)