def test_scaler_adder_conversion(self): node = ast.parse('a') cnv = unit_xform(node, 'degC', 'degF') newexpr = print_node(cnv) self.assertEqual(newexpr, '(a+17.7777777778)*1.8')
def test_simple_conversion(self): node = ast.parse('a') cnv = unit_xform(node, 'ft', 'inch') newexpr = print_node(cnv) self.assertEqual(newexpr, 'a*12.0')