Просмотр исходного кода

Stress tests: adds logs and raising tasks

Ask Solem 11 лет назад
Родитель
Сommit
54272aeba0
1 измененных файлов с 10 добавлено и 0 удалено
  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: