mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-14 12:10:24 +08:00
added tests for exception messages in datasources and transforms
This commit is contained in:
@@ -168,3 +168,28 @@ def create_monitor(allocator):
|
||||
)
|
||||
|
||||
return mon
|
||||
|
||||
class ExceptionSource(object):
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def get_hash(self):
|
||||
return "ExceptionSource"
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
def next(self):
|
||||
5 / 0
|
||||
|
||||
class ExceptionTransform(object):
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def get_hash(self):
|
||||
return "ExceptionTransform"
|
||||
|
||||
def update(self, event):
|
||||
assert False, "An assertion message"
|
||||
|
||||
Reference in New Issue
Block a user