2010-09-30 12:04:14 Julien Jehannet napisał(a):
> > * Julien Jehannet <[email protected]> [29-sep-2010 18:37]:
> > > * Arfrever Frehtes Taifersar Arahesis <[email protected]> 
> > > [29-sep-2010 09:16]:
> > > logilab-common 0.52.0 fails some tests:
> > >   (...)
> > > 
> > > test_knownValues_is_standard_module_4 always fails.
> > (see another thread about it)
> > > 
> > > test_capture_core fails after disabling test_both_capture with similar 
> > > error to this error,
> > > which occurs in test_both_capture. These 2 tests fail when stdout isn't a 
> > > tty. It can occur
> > > when tests are run by Gentoo's package manager and output is redirected. 
> > > I suggest that
> > > these tests are skipped when sys.stdout.isatty() is False.
> 
> I tried to reproduce but I can't find a way to have theses errors...
>       python test/unittest_testlib.py 1<&- 
>       python test/unittest_testlib.py &| pager
>       python test/unittest_testlib.py &> file
> 
> Can you provide the exact command-line ? Because I'm not sure the isatty
> condition is enough here.

The problem seems to also be related to type of terminal.

I have installed logilab-common-0.52.1 into 
"/tmp/logilab-common-0.52.1_installation_root"
and changed current directory to 
"/tmp/logilab-common-0.52.1_installation_root/usr/lib64/python2.6/site-packages/logilab/common".
If I directly run test/unittest_testlib.py (without any redirection) in 
/dev/tty1,
then all tests pass. In Konsole, the following error occurs:

$ PYTHONPATH=../.. python2.6 test/unittest_testlib.py
...................F.............................................................S......................
======================================================================
FAIL: test_both_capture (__main__.OutErrCaptureTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File 
"/tmp/logilab-common-0.52.1_installation_root/usr/lib64/python2.6/site-packages/logilab/common/testlib.py",
 line 1258, in _proceed
    testfunc(*args, **kwargs)
  File 
"/tmp/logilab-common-0.52.1_installation_root/usr/lib64/python2.6/site-packages/logilab/common/test/unittest_testlib.py",
 line 694, in test_both_capture
    self.assertEqual(captured_out.strip(), "bar")
  File "/usr/lib64/python2.6/site-packages/unittest2/case.py", line 521, in 
assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib64/python2.6/site-packages/unittest2/case.py", line 514, in 
_baseAssertEqual
    raise self.failureException(msg)
AssertionError: '\x1b[?1034hbar' != 'bar'

                              no stdout                               
                              no stderr                               
======================================================================
SKIPPED: test_custom_datadir (__main__.TestlibTC)
        should this really work?
----------------------------------------------------------------------
Ran 104 tests in 0.138s

FAILED (failures=1, skipped=1)

-- 
Arfrever Frehtes Taifersar Arahesis

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to