comparison nagslang/tests/test_yamlish.py @ 120:e6e7a471146a

Support numeric types
author Stefano Rivera <stefano@rivera.za.net>
date Mon, 02 Sep 2013 15:31:19 +0200
parents b75de48a618c
children 423266f0b9e4
comparison
equal deleted inserted replaced
119:b75de48a618c 120:e6e7a471146a
84 self.roundtrip({'foo': 'true'}) 84 self.roundtrip({'foo': 'true'})
85 85
86 def test_literals(self): 86 def test_literals(self):
87 self.roundtrip({'foo': [True, False, None]}) 87 self.roundtrip({'foo': [True, False, None]})
88 88
89 def test_numeric(self):
90 self.roundtrip({'foo': [1, 2.0, -1, -2.5]})
91
89 92
90 class TestFromPyYAML(TestRoundTrip): 93 class TestFromPyYAML(TestRoundTrip):
91 def dump_s(self, data): 94 def dump_s(self, data):
92 if yaml is None: 95 if yaml is None:
93 raise SkipTest('yaml module unavailable') 96 raise SkipTest('yaml module unavailable')