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