Unstable unit tests in control.controller
#27053 (closed) brought about some changes to stem's controller's event handling.
Unfortunately the tests for that are a bit unstable - sometimes failing. Instead of letting that ticket drag on, the work is being moved to a new ticket for better clarity.
The history behind that is mostly in #27053 (closed), so refer there. A few parts were discussed over IRC, however, so that context will be filled in below...
[...] The good news is that I figured out the python3 mock issue you found. Turns out there's a difference between PyPI and Python3's mock modules. Fixed...
I confirmed that this works for me.
From [ticket:27053#comment:15] (the latest comment at time of writing):
Hi Dave, think I got it but tough to be sure. Does this do the trick for you?
Tests are still failing as of this revision, still giving
AssertionError: Expected 'mock' to be called once. Called 0 times. for py27.
It seems to be more stable, now failing at ~5-10% rate instead of 25-40%. //(Rate not scientific)//