Debian patch that removes test_vterm.py
is attached.
Vincent, could you please include this patch
in new Debian package version?
Regards,
Dejan
diff -uNr urwid-1.2.1.orig/urwid/tests/test_vterm.py urwid-1.2.1/urwid/tests/test_vterm.py
--- urwid-1.2.1.orig/urwid/tests/test_vterm.py 2014-04-04 15:55:01.0 +
+++ urwid-1.2.1/urwid/tests/test_vterm.py 1970-01-01 00:00:00.0 +
@@ -1,334 +0,0 @@
-# Urwid terminal emulation widget unit tests
-#Copyright (C) 2010 aszlig
-#Copyright (C) 2011 Ian Ward
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Urwid web site: http://excess.org/urwid/
-
-import os
-import sys
-import unittest
-
-from itertools import dropwhile
-
-from urwid import vterm
-from urwid import signals
-from urwid.compat import B
-
-
-class DummyCommand(object):
-QUITSTRING = B('|||quit|||')
-
-def __init__(self):
-self.reader, self.writer = os.pipe()
-
-def __call__(self):
-# reset
-stdout = getattr(sys.stdout, 'buffer', sys.stdout)
-stdout.write(B('\x1bc'))
-
-while True:
-data = os.read(self.reader, 1024)
-if self.QUITSTRING == data:
-break
-stdout.write(data)
-stdout.flush()
-
-def write(self, data):
-os.write(self.writer, data)
-
-def quit(self):
-self.write(self.QUITSTRING)
-
-
-class TermTest(unittest.TestCase):
-def setUp(self):
-self.command = DummyCommand()
-
-self.term = vterm.Terminal(self.command)
-self.resize(80, 24)
-
-def tearDown(self):
-self.command.quit()
-
-def connect_signal(self, signal):
-self._sig_response = None
-
-def _set_signal_response(widget, *args, **kwargs):
-self._sig_response = (args, kwargs)
-self._set_signal_response = _set_signal_response
-
-signals.connect_signal(self.term, signal, self._set_signal_response)
-
-def expect_signal(self, *args, **kwargs):
-self.assertEqual(self._sig_response, (args, kwargs))
-
-def disconnect_signal(self, signal):
-signals.disconnect_signal(self.term, signal, self._set_signal_response)
-
-def caught_beep(self, obj):
-self.beeped = True
-
-def resize(self, width, height, soft=False):
-self.termsize = (width, height)
-if not soft:
-self.term.render(self.termsize, focus=False)
-
-def write(self, data):
-data = B(data)
-self.command.write(data.replace(B('\e'), B('\x1b')))
-
-def flush(self):
-self.write(chr(0x7f))
-
-def read(self, raw=False):
-self.term.wait_and_feed()
-rendered = self.term.render(self.termsize, focus=False)
-if raw:
-is_empty = lambda c: c == (None, None, B(' '))
-content = list(rendered.content())
-lines = [list(dropwhile(is_empty, reversed(line)))
- for line in content]
-return [list(reversed(line)) for line in lines if len(line)]
-else:
-content = rendered.text
-lines = [line.rstrip() for line in content]
-return B('\n').join(lines).rstrip()
-
-def expect(self, what, desc=None, raw=False):
-if not isinstance(what, list):
-what = B(what)
-got = self.read(raw=raw)
-if desc is None:
-desc = ''
-else:
-desc += '\n'
-desc += 'Expected:\n%r\nGot:\n%r' % (what, got)
-self.assertEqual(got, what, desc)
-
-def test_simplestring(self):
-self.write('hello world')
-self.expect('hello world')
-
-def test_linefeed(self):
-self.write('hello\x0aworld')
-self.expect('hello\nworld')
-
-def test_linefeed2(self):
-self.write('aa\b\b\eDbb')
-self.expect('aa\nbb')
-
-def test_carriage_return(self):
-self.write('hello\x0dworld')
-self.expect('world')
-
-def test_insertlines(self):
-self.write('\e[0;0flast\e[0;0f\e[10L\e[0;0ffirst\nsecond\n\e[11D')
-self.expect('first\nsecond\n\n\n\n\n\n\n\n\nlast')
-
-def test_deletelines(self):
-self.write('1\n2\n3\n4\e[2;1f\e[2M')
-self.expect('1\n4')
-
-def test_movement(self):
-