Skip to content

Commit

Permalink
Fixed race condition in test_value.py
Browse files Browse the repository at this point in the history
x.notify was set to late, the executing thread did already finish
processing the events.
  • Loading branch information
apollo13 committed Jan 27, 2017
1 parent 7443fb9 commit bac760a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/core/test_value.py
Expand Up @@ -91,8 +91,9 @@ def test_nested_value(app, watcher):


def test_value_notify(app, watcher):
x = app.fire(hello())
x.notify = True
ev = hello()
ev.notify = True
x = app.fire(ev)

assert watcher.wait("hello_value_changed")

Expand All @@ -102,8 +103,9 @@ def test_value_notify(app, watcher):


def test_nested_value_notify(app, watcher):
x = app.fire(test())
x.notify = True
ev = test()
ev.notify = True
x = app.fire(ev)

assert watcher.wait("test_value_changed")

Expand Down

0 comments on commit bac760a

Please sign in to comment.