[test/helper] Fix newlines in output of missing test fields
authorPhilipp Hagemeister <phihag@phihag.de>
Wed, 26 Nov 2014 21:52:28 +0000 (22:52 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Wed, 26 Nov 2014 21:52:28 +0000 (22:52 +0100)
test/helper.py

index 2e320e2cf23fbe9bf169933c0a7172a7a9a617ae..9a7f0746ec4ca02ed9f197395b8e48a1fffff38a 100644 (file)
@@ -141,7 +141,7 @@ def expect_info_dict(self, expected_dict, got_dict):
     if missing_keys:
         def _repr(v):
             if isinstance(v, compat_str):
-                return "'%s'" % v.replace('\\', '\\\\').replace("'", "\\'")
+                return "'%s'" % v.replace('\\', '\\\\').replace("'", "\\'").replace('\n', '\\n')
             else:
                 return repr(v)
         info_dict_str = ''.join(