def test_units_outputs(self):
     for usys, utype, prec, sep, compat, val, output in self.OUTPUT_TESTS:
         opt_str = units.to_string(usys, utype, val, prec, sep, compat)
         self.assertEqual(
             opt_str,
             output,
             msg=
             "%s, %s: %f (precision: %d, separate units: %d, compat units: %d) => "
             "\"%s\", expected \"%s\"" %
             (usys, utype, val, prec, sep, compat, opt_str, output))
 def test_units_outputs(self):
     for usys, utype, prec, sep, compat, val, output in self.OUTPUT_TESTS:
         opt_str = units.to_string(usys, utype, val, prec, sep, compat)
         self.assertEqual(
             opt_str, output,
             msg=(
                 "%s, %s: %f (precision: %d, separate units: %d, compat units: %d) => "
                 "\"%s\", expected \"%s\""
             ) % (usys, utype, val, prec, sep, compat, opt_str, output)
         )