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