Skip to content

Commit

Permalink
Fix test case for missing tasks (never make last minute changes just …
Browse files Browse the repository at this point in the history
…before commiting, doh...)
  • Loading branch information
cyberw committed Mar 11, 2020
1 parent 076fdf7 commit b330585
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions locust/test/test_locust_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@ class User(Locust):
wait_time = constant(0)
tasks = None
_catch_exceptions = False

l = MyTasks(User(self.environment))

self.assertRaisesRegex(Exception, "No tasks defined.*", l.run)


class MyTasks(TaskSet):
tasks = None

User.tasks = [MyTasks]
l = MyTasks(User(self.environment))
self.assertRaisesRegex(Exception, "No tasks defined.*", l.run)
l.tasks = None
self.assertRaisesRegex(Exception, "No tasks defined.*", l.run)

def test_task_decorator_ratio(self):
Expand Down

0 comments on commit b330585

Please sign in to comment.