Changeset 129:423266f0b9e4 for nagslang/tests/test_yamlish.py
- Timestamp:
- 09/02/13 14:57:59 (9 years ago)
- Branch:
- default
- Phase:
- public
- Rebase:
- 34393061663262633736346361303535343166323035393461343234306337376539663032316161
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nagslang/tests/test_yamlish.py
r120 r129 49 49 self.roundtrip({'foo': 'bar'}) 50 50 51 def test_simple_list(self): 52 self.roundtrip(['foo', 'bar']) 53 51 54 def test_dict_of_dicts(self): 52 55 self.roundtrip({'foo': {'bar': 'baz'}}) … … 62 65 }) 63 66 67 def test_list_of_lists(self): 68 self.roundtrip(['foo', ['bar', 'baz'], 'qux']) 69 64 70 def test_dict_list(self): 65 71 self.roundtrip({ 66 72 'foo': ['bar', 'baz'], 67 73 }) 74 75 def test_list_dict(self): 76 self.roundtrip([ 77 {'foo': 'bar'}, 78 {'baz': 'qux', 'quux': 'corge'}, 79 ]) 68 80 69 81 def test_nested_lists(self): … … 98 110 99 111 112 class TestFromPyYAMLInlineLists(TestRoundTrip): 113 def dump_s(self, data): 114 if yaml is None: 115 raise SkipTest('yaml module unavailable') 116 return yaml.dump(data) 117 118 100 119 class TestToPyYAML(TestRoundTrip): 101 120 def load_s(self, text):
Note:
See TracChangeset
for help on using the changeset viewer.