Ignore:
Timestamp:
05/06/06 18:09:50 (9 years ago)
Author:
xi
Message:

Fix #11 (Thanks to edemaine(at)mit.edu).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/tests/test_representer.py

    r150 r153  
    77class TestRepresenterTypes(test_appliance.TestAppliance): 
    88 
    9     def _testTypes(self, test_name, data_filename, code_filename): 
     9    def _testTypesUnicode(self, test_name, data_filename, code_filename): 
     10        return self._testTypes(test_name, data_filename, code_filename, allow_unicode=True) 
     11 
     12    def _testTypes(self, test_name, data_filename, code_filename, allow_unicode=False): 
    1013        data1 = eval(file(code_filename, 'rb').read()) 
    1114        data2 = None 
    1215        output = None 
    1316        try: 
    14             output = dump(data1, Dumper=MyDumper) 
     17            output = dump(data1, Dumper=MyDumper, allow_unicode=allow_unicode) 
    1518            data2 = load(output, Loader=MyLoader) 
    1619            self.failUnlessEqual(type(data1), type(data2)) 
     
    4346 
    4447TestRepresenterTypes.add_tests('testTypes', '.data', '.code') 
     48TestRepresenterTypes.add_tests('testTypesUnicode', '.data', '.code') 
    4549 
Note: See TracChangeset for help on using the changeset viewer.