yaml_import: fix ambiguous syntax at end of report
authorP. Christeas <xrg@linux.gr>
Sun, 5 Jun 2011 11:35:20 +0000 (14:35 +0300)
committerP. Christeas <xrg@linux.gr>
Sun, 5 Jun 2011 11:35:20 +0000 (14:35 +0300)
When finishing a YAML import, the syntax ["str %d" % int + int] turns
out to be ambiguous and is resolved as [ ("str %d" % int) + int],
leading to a:
  TypeError: cannot concatenate 'str' and 'int' objects

This had been first fixed in commit f46966e044d18a644 (2010-06-30)
(cherry picked from commit cc0c584e5dfbf672d51f61e7207047f357e31471)

bzr revid: xrg@linux.gr-20110605113520-4jvooqvs2wbm1qs0

bin/tools/yaml_import.py

index 2b5c982..6e5977d 100644 (file)
@@ -106,7 +106,7 @@ class TestReport(object):
             success += self._report[severity][True]
             failure += self._report[severity][False]
         res.append("total\t%s\t%s" % (success, failure))
-        res.append("end of report (%s assertion(s) checked)" % success + failure)
+        res.append("end of report (%s assertion(s) checked)" % (success + failure))
         return "\n".join(res)
 
 class RecordDictWrapper(dict):