Skip to content
Browse files

fix broken tests for PIL deadlock fix

  • Loading branch information...
1 parent 7fb0e34 commit 565ba3678d0d803a3f7b1c4035e5205f1642f040 @sibson committed Nov 10, 2013
Showing with 11 additions and 15 deletions.
  1. +3 −4 HISTORY.txt
  2. +1 −1 setup.py
  3. +7 −10 tests/unit/test_client.py
View
7 HISTORY.txt
@@ -1,8 +1,7 @@
-0.9.0 (unreleased)
+0.8.1 (unreleased)
------------------
-
-- Nothing changed yet.
-
+ - API, fix deadlocks due to threaded init of PIL, thanks Antti Kervinen
+ - API, support password protected server, thanks Antti Kervinen
0.8.0 (2013-08-06)
------------------
View
2 setup.py
@@ -6,7 +6,7 @@
setup(
name='vncdotool',
- version='0.9.0.dev0',
+ version='0.8.1.dev0',
description='Command line VNC client',
install_requires=[
'Twisted',
View
17 tests/unit/test_client.py
@@ -87,15 +87,14 @@ def test_expectScreen(self):
fname = 'something.png'
region = (0 ,0, 11, 22)
- client.ImageFactory.return_value.open.return_value.size = region[2:]
+ client.Image.open.return_value.size = region[2:]
d = cli.expectScreen(fname, 5)
assert cli.framebufferUpdateRequest.called
- image = client.ImageFactory.return_value
- image.open.assert_called_once_with(fname)
+ client.Image.open.assert_called_once_with(fname)
- assert cli.expected == image.open.return_value.histogram.return_value
+ assert cli.expected == client.Image.open.return_value.histogram.return_value
cli.deferred.addCallback.assert_called_once_with(cli._expectCompare, region, 5)
def test_expectCompareSuccess(self):
@@ -161,10 +160,9 @@ def test_updateRectangeFullScreen(self):
cli.updateRectangle(0, 0, 100, 200, data)
- image = client.ImageFactory.return_value
- image.fromstring.assert_called_once_with('RGB', (100, 200), data, 'raw', 'RGBX')
+ client.Image.fromstring.assert_called_once_with('RGB', (100, 200), data, 'raw', 'RGBX')
- assert cli.screen == image.fromstring.return_value
+ assert cli.screen == client.Image.fromstring.return_value
def test_updateRectangeRegion(self):
cli = self.client
@@ -175,11 +173,10 @@ def test_updateRectangeRegion(self):
cli.updateRectangle(20, 10, 50, 40, data)
- image = client.ImageFactory.return_value
- image.fromstring.assert_called_once_with('RGB', (50, 40), data, 'raw', 'RGBX')
+ client.Image.fromstring.assert_called_once_with('RGB', (50, 40), data, 'raw', 'RGBX')
paste = cli.screen.paste
- paste.assert_called_once_with(image.fromstring.return_value, (20, 10))
+ paste.assert_called_once_with(client.Image.fromstring.return_value, (20, 10))
def test_commitUpdate(self):
rects = mock.Mock()

0 comments on commit 565ba36

Please sign in to comment.
Something went wrong with that request. Please try again.