Changeset 331 for pyyaml/trunk/tests
- Timestamp:
- 12/29/08 18:21:43 (3 years ago)
- Location:
- pyyaml/trunk/tests/lib3
- Files:
-
- 2 modified
-
test_structure.py (modified) (2 diffs)
-
test_yaml_ext.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pyyaml/trunk/tests/lib3/test_structure.py
r330 r331 140 140 def construct_mapping(self, node): 141 141 pairs = self.construct_pairs(node) 142 pairs.sort( )142 pairs.sort(key=(lambda i: str(i))) 143 143 return pairs 144 144 def construct_undefined(self, node): … … 156 156 def construct_mapping(self, node): 157 157 pairs = self.construct_pairs(node) 158 pairs.sort( )158 pairs.sort(key=(lambda i: str(i))) 159 159 return pairs 160 160 def construct_undefined(self, node): -
pyyaml/trunk/tests/lib3/test_yaml_ext.py
r330 r331 253 253 if not isinstance(collection, dict): 254 254 collection = vars(collection) 255 keys = collection.keys() 256 keys.sort() 257 for key in keys: 255 for key in sorted(collection): 258 256 value = collection[key] 259 257 if isinstance(value, types.FunctionType) and hasattr(value, 'unittest'): 260 258 functions.append(wrap_ext_function(value)) 261 259 for function in functions: 262 assert function. unittest_namenot in globals()263 globals()[function. unittest_name] = function260 assert function.__name__ not in globals() 261 globals()[function.__name__] = function 264 262 265 263 import test_tokens, test_structure, test_errors, test_resolver, test_constructor, \
