Skip to content

Commit

Permalink
Added some regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashaag committed Dec 7, 2010
1 parent 75150bb commit c90e5ef
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/test_exc_info_reference.py
@@ -0,0 +1,26 @@
alist = []

def app(env, start_response):
print 'foo!'
print type(start_response)
print dir(start_response)
c = start_response.__class__
try:
c()
except:
import traceback; traceback.print_exc()
try:
class x(c): pass
except:
import traceback; traceback.print_exc()
start_response('200 alright', [])
try:
a
except:
import sys
x = sys.exc_info()
start_response('500 error', alist, x)
return ['hello']

import bjoern
bjoern.run(app, '0.0.0.0', 8080)

0 comments on commit c90e5ef

Please sign in to comment.