Explorar o código

Stress tests: adds logs and raising tasks

Ask Solem %!s(int64=11) %!d(string=hai) anos
pai
achega
54272aeba0
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      funtests/stress/stress/app.py

+ 10 - 0
funtests/stress/stress/app.py

@@ -124,6 +124,16 @@ def segfault():
     assert False, 'should not get here'
 
 
+@app.task
+def raising(exc=KeyError()):
+    raise exc
+
+
+@app.task
+def logs(msg):
+    print(msg)
+
+
 def marker(s, sep='-'):
     print('{0}{1}'.format(sep, s))
     while True: