Changeset 328 for pyyaml/trunk/tests3/test_yaml_ext.py
- Timestamp:
- 12/29/08 12:24:05 (4 years ago)
- Location:
- pyyaml/trunk/tests3
- Files:
-
- 1 edited
- 1 copied
-
. (copied) (copied from pyyaml/trunk/tests)
-
test_yaml_ext.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pyyaml/trunk/tests3/test_yaml_ext.py
r325 r328 118 118 def test_c_version(verbose=False): 119 119 if verbose: 120 print _yaml.get_version()121 print _yaml.get_version_string()120 print(_yaml.get_version()) 121 print(_yaml.get_version_string()) 122 122 assert ("%s.%s.%s" % _yaml.get_version()) == _yaml.get_version_string(), \ 123 123 (_yaml.get_version(), _yaml.get_version_string()) … … 144 144 finally: 145 145 if verbose: 146 print "PY_TOKENS:"146 print("PY_TOKENS:") 147 147 pprint.pprint(py_tokens) 148 print "C_TOKENS:"148 print("C_TOKENS:") 149 149 pprint.pprint(c_tokens) 150 150 … … 177 177 finally: 178 178 if verbose: 179 print "PY_EVENTS:"179 print("PY_EVENTS:") 180 180 pprint.pprint(py_events) 181 print "C_EVENTS:"181 print("C_EVENTS:") 182 182 pprint.pprint(c_events) 183 183 … … 199 199 c_data = yaml.emit(events, Dumper=yaml.CDumper) 200 200 if verbose: 201 print c_data201 print(c_data) 202 202 py_events = list(yaml.parse(c_data, Loader=yaml.PyLoader)) 203 203 c_events = list(yaml.parse(c_data, Loader=yaml.CLoader)) … … 211 211 py_value = getattr(py_event, attribute, None) 212 212 c_value = getattr(c_event, attribute, None) 213 if attribute == 'tag' and value in [None, u'!'] \214 and py_value in [None, u'!'] and c_value in [None, u'!']:213 if attribute == 'tag' and value in [None, '!'] \ 214 and py_value in [None, '!'] and c_value in [None, '!']: 215 215 continue 216 216 if attribute == 'explicit' and (py_value or c_value): … … 220 220 finally: 221 221 if verbose: 222 print "EVENTS:"222 print("EVENTS:") 223 223 pprint.pprint(events) 224 print "PY_EVENTS:"224 print("PY_EVENTS:") 225 225 pprint.pprint(py_events) 226 print "C_EVENTS:"226 print("C_EVENTS:") 227 227 pprint.pprint(c_events) 228 228 … … 241 241 finally: 242 242 _tear_down() 243 try: 244 wrapper.func_name = '%s_ext' % function.func_name 245 except TypeError: 246 pass 247 wrapper.unittest_name = '%s_ext' % function.func_name 243 wrapper.__name__ = '%s_ext' % function.__name__ 248 244 wrapper.unittest = function.unittest 249 245 wrapper.skip = getattr(function, 'skip', [])+['.skip-ext']
Note: See TracChangeset
for help on using the changeset viewer.
