Exemple #1
0
 def test_mm(self):
     self.assertAlmostEqual(
         convertPrintParameterToInches('12mm'),
         12.0 * 3.78 / 96,
     )
Exemple #2
0
 def test_inch(self):
     self.assertAlmostEqual(
         convertPrintParameterToInches('12in'),
         12.0,
     )
Exemple #3
0
 def test_cm(self):
     self.assertAlmostEqual(
         convertPrintParameterToInches('12cm'),
         12.0 * 37.8 / 96,
     )
Exemple #4
0
 def test_px(self):
     self.assertEqual(
         convertPrintParameterToInches('12px'),
         12.0 / 96,
     )
Exemple #5
0
 def test_mm(self):
     self.assertAlmostEqual(
         convertPrintParameterToInches('12mm'),
         12.0 * 3.78 / 96,
     )
Exemple #6
0
 def test_cm(self):
     self.assertAlmostEqual(
         convertPrintParameterToInches('12cm'),
         12.0 * 37.8 / 96,
     )
Exemple #7
0
 def test_inch(self):
     self.assertAlmostEqual(
         convertPrintParameterToInches('12in'),
         12.0,
     )
Exemple #8
0
 def test_px(self):
     self.assertEqual(
         convertPrintParameterToInches('12px'),
         12.0 / 96,
     )