test_expectScreen() calls expectScreen() calls _expectFramebuffer(), which changed behavior by #221:
previously it called _expectCompare() via a Deferred. As the unit-test runs without any Twisted reactor running, the real code for comparison was never executed.
now _expectCompare() is called synchronously (if a previous screen already exists) and fails, because the mocked Image cannot be used with len():
if len(hist) == len(self.expected):
E TypeError: object of type 'Mock' has no len()
For the unit test restore the old behavior and let self.screen = None remain to not trigger calling _expectCompare().
test_expectScreen()
callsexpectScreen()
calls_expectFramebuffer()
, which changed behavior by #221:_expectCompare()
via aDeferred
. As the unit-test runs without any Twisted reactor running, the real code for comparison was never executed._expectCompare()
is called synchronously (if a previousscreen
already exists) and fails, because the mocked Image cannot be used withlen()
:For the unit test restore the old behavior and let
self.screen = None
remain to not trigger calling_expectCompare()
.