Permalink
Browse files

Remove use of string exceptions in gen_test.

These lines are not reached, but if they were they would fail with
a less clear message than intended.

Closes #520.
  • Loading branch information...
1 parent 9118028 commit 5e514195b1258a3b72a2d2200e06c1f8e23621c6 @bdarnell bdarnell committed May 28, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 tornado/test/gen_test.py
View
@@ -168,7 +168,7 @@ def test_exception_in_yield(self):
def f():
try:
yield gen.Wait("k1")
- raise "did not get expected exception"
+ raise Exception("did not get expected exception")
except gen.UnknownKeyError:
pass
self.stop()
@@ -179,7 +179,7 @@ def test_resume_after_exception_in_yield(self):
def f():
try:
yield gen.Wait("k1")
- raise "did not get expected exception"
+ raise Exception("did not get expected exception")
except gen.UnknownKeyError:
pass
(yield gen.Callback("k2"))("v2")
@@ -193,7 +193,7 @@ def f():
self.orphaned_callback = yield gen.Callback(1)
try:
self.run_gen(f)
- raise "did not get expected exception"
+ raise Exception("did not get expected exception")
except gen.LeakedCallbackError:
pass
self.orphaned_callback()

0 comments on commit 5e51419

Please sign in to comment.