[Python-modules-team] Bug#743685: urwid: FTBFS: test failures

2014-05-18 Thread Vincent Cheng
reopen 743685
thanks

On Fri, May 16, 2014 at 2:59 AM, Vincent Cheng  wrote:
> On Wed, May 14, 2014 at 9:12 AM, Dejan Latinovic
>  wrote:
>>
>>
>> Debian patch that removes test_vterm.py
>> is attached.
>>
>> Vincent, could you please include this patch
>> in new Debian package version?
>
> Thanks, I'll take a look at this asap.
>
> Ian: it doesn't have to be fixed in upstream right now, no, but it'd
> be nice to have those tests removed (or fixed?) upstream as well so we
> don't end up carrying this patch in Debian forever.
>

Uploaded...but it looks like it's failing to build on mips now [1];
looks like the same test
(urwid.tests.test_event_loops.TwistedEventLoopTest) that failed wth
urwid/1.2.0-1. The fact that these tests don't consistently fail on
mips(el) is rather annoying. Does anyone know what's going on?

Regards,
Vincent

[1] 
https://buildd.debian.org/status/fetch.php?pkg=urwid&arch=mips&ver=1.2.1-2&stamp=1400413671

___
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team


[Python-modules-team] Bug#743685: urwid: FTBFS: test failures

2014-05-16 Thread Vincent Cheng
On Wed, May 14, 2014 at 9:12 AM, Dejan Latinovic
 wrote:
>
>
> Debian patch that removes test_vterm.py
> is attached.
>
> Vincent, could you please include this patch
> in new Debian package version?

Thanks, I'll take a look at this asap.

Ian: it doesn't have to be fixed in upstream right now, no, but it'd
be nice to have those tests removed (or fixed?) upstream as well so we
don't end up carrying this patch in Debian forever.

Regards,
Vincent

___
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team


[Python-modules-team] Bug#743685: urwid: FTBFS: test failures

2014-05-14 Thread Dejan Latinovic


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):
-  

[Python-modules-team] Bug#743685: urwid: FTBFS: test failures

2014-05-14 Thread Ian Ward
Yes, let's remove the vterm tests. Removing the test_vterm.py file is an
easy workaround.

Does this need to be done upstream or can it just be a Debian patch?
On 14 May 2014 11:03, "Dejan Latinovic"  wrote:

>
> Hi,
>
> I have run tests manually on my local mips/mipsel machines a bunch of
> times.
>
> Of 29 tries, test failed 27 times with varius tests failures,
> 2 times finished successfully.
>
> Here is a list of tests that failed with frequences of failures.
>
> > 14 FAIL: test_defargs (urwid.tests.test_vterm.TermTest)
> > 10 FAIL: test_linefeed (urwid.tests.test_vterm.TermTest)
> >  8 FAIL: test_deletelines (urwid.tests.test_vterm.TermTest)
> >  8 FAIL: test_cursor_scrolling_region
> (urwid.tests.test_vterm.TermTest)
> >  7 FAIL: test_scrolling_region_simple
> (urwid.tests.test_vterm.TermTest)
> >  4 FAIL: test_wrap_backspace_tab (urwid.tests.test_vterm.TermTest)
> >  4 FAIL: test_scrolling_region_reverse
> (urwid.tests.test_vterm.TermTest)
> >  4 FAIL: test_nullargs (urwid.tests.test_vterm.TermTest)
> >  3 FAIL: test_insertlines (urwid.tests.test_vterm.TermTest)
> >  3 FAIL: test_erase_line (urwid.tests.test_vterm.TermTest)
>
>
> Full log with all test results is attached.
>
>
> If I run tests on cavium machine (as lucatelli),
> tests fail much rarer.
>
>
> Should we consider removing tests,
> at least while somebody fixes them?
>
>
> Best regards,
> Dejan
>
>
>
>
>
___
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team