aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_output.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2012-02-27 18:54:37 +0100
committerMatěj Cepl <mcepl@redhat.com>2012-02-27 18:54:37 +0100
commitd9f2aa1f9d1066a168700c4e356db4f26772468a (patch)
treeafe42448063640b6b822e95c032fd649a6be353d /test/test_output.py
parenta9adb2cae3d62d95a1fdc57d7137dca5e5b9ada9 (diff)
downloadyamlish-d9f2aa1f9d1066a168700c4e356db4f26772468a.tar.gz
Temporary commit to make files available
Diffstat (limited to 'test/test_output.py')
-rw-r--r--test/test_output.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/test_output.py b/test/test_output.py
index cebd66d..4ed050f 100644
--- a/test/test_output.py
+++ b/test/test_output.py
@@ -44,31 +44,31 @@ IN = {
'given': 'Chris',
'address': {
'city': 'Royal Oak',
- 'postal': '48046',
- 'lines': "458 Walkman Dr.\nSuite #292\n",
+ 'postal': 48046,
+ 'lines': "458 Walkman Dr.\\nSuite #292\\n",
'state': 'MI'
},
'family': 'Dumars'
},
- 'invoice': '34843',
+ 'invoice': 34843,
'date': '2001-01-23',
- 'tax': '251.42',
+ 'tax': 251.42,
'product': [
{
'sku': 'BL394D',
- 'quantity': '4',
- 'price': '450.00',
+ 'quantity': 4,
+ 'price': 450.00,
'description': 'Basketball'
},
{
'sku': 'BL4438H',
- 'quantity': '1',
- 'price': '2392.00',
+ 'quantity': 1,
+ 'price': 2392.00,
'description': 'Super Hoop'
}
],
- 'comments': "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338\n",
- 'total': '4443.52'
+ 'comments': "Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338\\n",
+ 'total': 4443.52
}
buf1 = []
@@ -100,10 +100,10 @@ class TestOuptut(unittest.TestCase):
"""
self._expected = ""
for line in OUT:
- self._expected += "%s\n" % line
+ self._expected += line + "\n"
- def test_file_output(self):
+ def notest_file_output(self):
"""
Test output to a file.
"""
@@ -124,10 +124,10 @@ class TestOuptut(unittest.TestCase):
"""
got = yamlish.dumps(IN)
self.assertEqual(got, self._expected, """Result matches
- expected = %s
-
- observed = %s
- """ % (self._expected, got))
+ expected = %s
+
+ observed = %s
+ """ % (self._expected, got))
if __name__ == "__main__":
unittest.main()