Re-enable screen shot tests on AppVeyor.
Robpol86 opened this issue · 0 comments
Robpol86 commented
Something recently changed with AppVeyor (maybe when they moved hosting to RackSpace) and now pillow cannot take screen shots in the RDP session.
[00:02:44] with RunNewConsole(command) as gen:
[00:02:44] > screenshot_until_match(str(screenshot), 15, sub_images, 1, gen)
[00:02:44] tests\test_all_tables_e2e\test_ascii_table.py:144:
[00:02:44] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[00:02:44] tests\screenshot.py:285: in screenshot_until_match
[00:02:44] with ImageGrab.grab(next(gen)) as rgba:
[00:02:44] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[00:02:44]
[00:02:44] bbox = (26, 26, 703, 369)
[00:02:44]
[00:02:44] def grab(bbox=None):
[00:02:44] if sys.platform == "darwin":
[00:02:44] fh, filepath = tempfile.mkstemp('.png')
[00:02:44] os.close(fh)
[00:02:44] subprocess.call(['screencapture', '-x', filepath])
[00:02:44] im = Image.open(filepath)
[00:02:44] im.load()
[00:02:44] os.unlink(filepath)
[00:02:44] else:
[00:02:44] > size, data = grabber()
[00:02:44] E OSError: screen grab failed