Ignore:
Timestamp:
09/06/13 11:38:07 (8 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Phase:
public
Message:

Allow tuples in dicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/tests/test_yamlish.py

    r138 r344  
    127127                         tuple(result['polygons'][1][1]))
    128128
     129    def test_dict_tuples(self):
     130        if self.from_pyyaml:
     131            raise SkipTest("Can't parse PyYAML tuples")
     132        orig = {'tuple': (0, 1)}
     133        text = self.dump_s(orig)
     134        result = self.load_s(text)
     135        self.assertEqual(orig['tuple'],
     136                         tuple(result['tuple']))
     137
    129138    def test_quoted(self):
    130139        # a literal true is True, but 'true' is a string
Note: See TracChangeset for help on using the changeset viewer.