Changeset 325
- Timestamp:
- 12/28/08 16:42:35 (4 years ago)
- Location:
- pyyaml/trunk
- Files:
-
- 5 edited
-
setup.py (modified) (1 diff)
-
tests/test_appliance.py (modified) (5 diffs)
-
tests/test_constructor.py (modified) (1 diff)
-
tests/test_recursive.py (modified) (1 diff)
-
tests/test_yaml_ext.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pyyaml/trunk/setup.py
r322 r325 221 221 depends=ext.depends) 222 222 except CompileError: 223 log.warn("%s appears not to be installed" % ext.feature_name) 223 log.warn("%s appears not to be installed: forcing --%s" 224 % (ext.feature_name, ext.neg_option_name)) 224 225 log.warn("(if %s is installed, you may need to specify" 225 226 % ext.feature_name) -
pyyaml/trunk/tests/test_appliance.py
r322 r325 52 52 53 53 def execute(function, filenames, verbose): 54 if hasattr(function, 'unittest_name'): 55 name = function.unittest_name 56 else: 57 name = function.func_name 54 58 if verbose: 55 59 sys.stdout.write('='*75+'\n') 56 sys.stdout.write('%s(%s)...\n' % ( function.func_name, ', '.join(filenames)))60 sys.stdout.write('%s(%s)...\n' % (name, ', '.join(filenames))) 57 61 try: 58 62 function(verbose=verbose, *filenames) … … 74 78 sys.stdout.write('.') 75 79 sys.stdout.flush() 76 return ( function, filenames, kind, info)80 return (name, filenames, kind, info) 77 81 78 82 def display(results, verbose): … … 82 86 failures = 0 83 87 errors = 0 84 for function, filenames, kind, info in results:88 for name, filenames, kind, info in results: 85 89 if kind == 'SUCCESS': 86 90 continue … … 90 94 errors += 1 91 95 sys.stdout.write('='*75+'\n') 92 sys.stdout.write('%s(%s): %s\n' % ( function.func_name, ', '.join(filenames), kind))96 sys.stdout.write('%s(%s): %s\n' % (name, ', '.join(filenames), kind)) 93 97 if kind == 'ERROR': 94 98 traceback.print_exception(file=sys.stdout, *info) … … 99 103 sys.stdout.write('~'*75+'\n') 100 104 for arg in info[1].args: 101 pprint.pprint(arg, stream=sys.stdout , indent=2)105 pprint.pprint(arg, stream=sys.stdout) 102 106 for filename in filenames: 103 107 sys.stdout.write('-'*75+'\n') -
pyyaml/trunk/tests/test_constructor.py
r322 r325 232 232 elif isinstance(data, unicode): 233 233 return data.encode('utf-8') 234 elif isinstance(data, float) and data != data: 235 return '?' 234 236 else: 235 237 return str(data) -
pyyaml/trunk/tests/test_recursive.py
r322 r325 36 36 finally: 37 37 if verbose: 38 print "VALUE1:", value139 print "VALUE2:", value238 #print "VALUE1:", value1 39 #print "VALUE2:", value2 40 40 print "OUTPUT1:" 41 41 print output1 -
pyyaml/trunk/tests/test_yaml_ext.py
r322 r325 241 241 finally: 242 242 _tear_down() 243 wrapper.func_name = '%s_ext' % function.func_name 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 244 248 wrapper.unittest = function.unittest 245 249 wrapper.skip = getattr(function, 'skip', [])+['.skip-ext'] … … 260 264 functions.append(wrap_ext_function(value)) 261 265 for function in functions: 262 assert function. func_name not in globals()263 globals()[function. func_name] = function266 assert function.unittest_name not in globals() 267 globals()[function.unittest_name] = function 264 268 265 269 import test_tokens, test_structure, test_errors, test_resolver, test_constructor, \
Note: See TracChangeset
for help on using the changeset viewer.
