logilab-common #104047 Tests fails when run under python3 [done]

Hello,
several unittests fails when running them with python3, here's the log of the run under py3k (so including even skipped or succesfully ones):
# use the default python version to select the script dir to run the tests
PYTHONPATH=/home/morph/deb/build-area/logilab-common-0.58.2/build/lib.linux-x86_64-2.7/ /home/morph/deb/build-area/logilab-common-0.58.2/build/scripts-2.7/pytest -t /home/morph/deb/build-area/logilab-common-0.58.2/build/lib.linux-x86_64-2.7/logilab/common/test
======================  unittest_decorators.py  ======================
............
=========================  unittest_date.py  =========================
...............................................
========================  unittest_pytest.py  ========================
..
=========================  unittest_tree.py  =========================
........................
======================  unittest_shellutils.py  ======================
.......................
=====================  unittest_deprecation.py  ======================
....
======================  unittest_changelog.py  =======================
unittest_changelog.py:33: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.assertStreamEquals(open(self.cl_file), out)
.
=======================  unittest_umessage.py  =======================
....
====================  unittest_configuration.py  =====================
.............
=======================  unittest_modutils.py  =======================
...................................
=======================  unittest_xmlutils.py  =======================
.....
========================  unittest_cache.py  =========================
........
====================  unittest_ureports_text.py  =====================
.......
======================  unittest_taskqueue.py  =======================
.....
========================  unittest_graph.py  =========================
..............
========================  unittest_table.py  =========================
.....................................
======================  unittest_textutils.py  =======================
.........................................
======================  unittest_fileutils.py  =======================
............
======================  unittest_interface.py  =======================
.....
=======================  unittest_testlib.py  ========================
............................................................................unittest_testlib.py:180: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.assertDirEqual(ed1, ed2)
unittest_testlib.py:181: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.assertDirEqual(ref, ref)
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib.linux-x86_64-2.7/logilab/common/testlib.py:1059: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  osp.join(path_b, ipath_b, ifiles_b[index]))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib.linux-x86_64-2.7/logilab/common/testlib.py:998: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
unittest_testlib.py:182: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.assertDirEqual( ref, same)
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib.linux-x86_64-2.7/logilab/common/testlib.py:1150: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  callableObj(*args, **kwargs)
..unittest_testlib.py:166: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.tc.assertFileEqual(foo, foo)
.........unittest_testlib.py:193: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.tc.assertStreamEqual(stream1, stream1)
.....unittest_testlib.py:119: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.tc.assertXMLStringWellFormed(valid)
...
====================  unittest_ureports_html.py  =====================
.......
========================  unittest_compat.py  ========================
....
=======================  unittest_registry.py  =======================
..........
*******************************************************************************
Ran 415 test cases in 11.40s (0.35s CPU)
All 23 modules OK
PYTHONPATH=/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/ /home/morph/deb/build-area/logilab-common-0.58.2/build/scripts-3.2/pytest -t /home/morph/deb/build-area/logilab-common-0.58.2/build/lib//logilab/common/test
======================  unittest_decorators.py  ======================
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:1087: DeprecationWarning: Please use assertTrue instead.
  self.assert_(isinstance(obj, klass), msg)
.....unittest_decorators.py:181: DeprecationWarning: Please use assertFalse instead.
  self.failIf('bar' in foo.__dict__)
unittest_decorators.py:183: DeprecationWarning: Please use assertTrue instead.
  self.failUnless('bar' in foo.__dict__)
...EF..
======================================================================
ERROR: test_monkeypatch_callable_non_callable (unittest_decorators.DecoratorsTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_decorators.py", line 60, in test_monkeypatch_callable_non_callable
    self.assertEqual(MyClass().foo(), 12)
TypeError: __call__() takes exactly 2 arguments (1 given)

                              no stdout                               
                              no stderr                               
======================================================================
FAIL: test_monkeypatch_instance_method (unittest_decorators.DecoratorsTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_decorators.py", line 38, in test_monkeypatch_instance_method
    self.assertTrue(isinstance(MyClass.meth1, types.MethodType))
  File "/usr/lib/python3.2/unittest/case.py", line 506, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true

                              no stdout                               
                              no stderr                               
=========================  unittest_date.py  =========================
.....................EEunittest_date.py:150: DeprecationWarning: Please use skipTest instead.
  self.skip('mx.DateTime is not installed')
SSSSSSSSSSSSSSSSSSSSSS
======================================================================
ERROR: test_ticks2datetime_before_1900 (unittest_date.DateTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_date.py", line 139, in test_ticks2datetime_before_1900
    self.assertEqual(ustrftime(date, '%Y-%m-%d'), '1899-12-31')
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/date.py", line 288, in ustrftime
    return str(somedate.strftime(str(fmt)), encoding)
TypeError: decoding str is not supported

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_ustrftime_before_1900 (unittest_date.DateTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_date.py", line 133, in test_ustrftime_before_1900
    self.assertEqual(ustrftime(date, '%Y-%m-%d %H:%M:%S'), '1328-03-12 06:30:00')
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/date.py", line 288, in ustrftime
    return str(somedate.strftime(str(fmt)), encoding)
TypeError: decoding str is not supported

                              no stdout                               
                              no stderr                               
======================================================================
SKIPPED: test_add_days_worked (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_day (unittest_date.MxDateTC)
enumerate days
	mx.DateTime is not installed
======================================================================
SKIPPED: test_get_national_holidays (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_month (unittest_date.MxDateTC)
enumerate months
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_afternoon (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_afternoon_before_holiday (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_afternoon_before_saturday (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_day_nextday (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_friday_monday (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_friday_monday_with_two_weekends (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_friday_saturday (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_friday_sunday (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_now_and_before (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_now_now (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_now_now2 (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_saturday_monday (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_saturday_sunday (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_saturday_tuesday (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_tuesday_friday (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_open_days_tuesday_wednesday (unittest_date.MxDateTC)
week-end + easter monday
	mx.DateTime is not installed
======================================================================
SKIPPED: test_ticks2datetime_before_1900 (unittest_date.MxDateTC)
	mx.DateTime is not installed
======================================================================
SKIPPED: test_ustrftime_before_1900 (unittest_date.MxDateTC)
	mx.DateTime is not installed
========================  unittest_pytest.py  ========================
..
=========================  unittest_tree.py  =========================
........................
======================  unittest_shellutils.py  ======================
................EE.....
======================================================================
ERROR: test_update_exact (unittest_shellutils.ProgressBarTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_shellutils.py", line 156, in test_update_exact
    expected_stream.write("\r["+('.'*dots)+(' '*(size-dots))+"]")
TypeError: can't multiply sequence by non-int of type 'float'

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_update_relative (unittest_shellutils.ProgressBarTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_shellutils.py", line 168, in test_update_relative
    expected_stream.write("\r["+('.'*dots)+(' '*(size-dots))+"]")
TypeError: can't multiply sequence by non-int of type 'float'

                              no stdout                               
                              no stderr                               
=====================  unittest_deprecation.py  ======================
....
======================  unittest_changelog.py  =======================
unittest_changelog.py:33: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.assertStreamEquals(open(self.cl_file), out)
unittest_changelog.py:33: ResourceWarning: unclosed file 
  self.assertStreamEquals(open(self.cl_file), out)
.
=======================  unittest_umessage.py  =======================
E/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:540: ResourceWarning: unclosed file 
  return False
EEE
======================================================================
ERROR: test_decode_QP (unittest_umessage.UMessageTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp
    msg1 = email.message_from_file(open(join(DATA, 'test1.msg')))
  File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file
    return Parser(*args, **kws).parse(fp)
  File "/usr/lib/python3.2/email/parser.py", line 68, in parse
    data = fp.read(8192)
  File "/usr/lib/python3.2/codecs.py", line 300, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 898: invalid continuation byte

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_get_all (unittest_umessage.UMessageTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp
    msg1 = email.message_from_file(open(join(DATA, 'test1.msg')))
  File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file
    return Parser(*args, **kws).parse(fp)
  File "/usr/lib/python3.2/email/parser.py", line 68, in parse
    data = fp.read(8192)
  File "/usr/lib/python3.2/codecs.py", line 300, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 898: invalid continuation byte

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_get_payload_no_multi (unittest_umessage.UMessageTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp
    msg1 = email.message_from_file(open(join(DATA, 'test1.msg')))
  File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file
    return Parser(*args, **kws).parse(fp)
  File "/usr/lib/python3.2/email/parser.py", line 68, in parse
    data = fp.read(8192)
  File "/usr/lib/python3.2/codecs.py", line 300, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 898: invalid continuation byte

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_get_subject (unittest_umessage.UMessageTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp
    msg1 = email.message_from_file(open(join(DATA, 'test1.msg')))
  File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file
    return Parser(*args, **kws).parse(fp)
  File "/usr/lib/python3.2/email/parser.py", line 68, in parse
    data = fp.read(8192)
  File "/usr/lib/python3.2/codecs.py", line 300, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 898: invalid continuation byte

                              no stdout                               
                              no stderr                               
====================  unittest_configuration.py  =====================
.............
=======================  unittest_modutils.py  =======================
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/modutils.py:554: ResourceWarning: unclosed file 
  mtype, mp_filename = _module_file(modpath, path)
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/modutils.py:354: ResourceWarning: unclosed file 
  return '.'.join(parts[:i])
............./home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/modutils.py:550: ResourceWarning: unclosed file 
  mtype, mp_filename = _module_file(modpath, [context])
..unittest_modutils.py:262: ResourceWarning: unclosed file 
  m = modutils.load_module_from_modpath(['logilab', 'common', 'fileutils'])
unittest_modutils.py:263: DeprecationWarning: Please use assertTrue instead.
  self.assert_( hasattr(logilab, 'common') )
unittest_modutils.py:264: DeprecationWarning: Please use assertTrue instead.
  self.assert_( hasattr(logilab.common, 'fileutils') )
unittest_modutils.py:265: DeprecationWarning: Please use assertTrue instead.
  self.assert_( m is logilab.common.fileutils )
..../home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/modutils.py:532: ResourceWarning: unclosed file 
  find_module(modname.split('.')[0], [from_file])
................
=======================  unittest_xmlutils.py  =======================
.....
========================  unittest_cache.py  =========================
unittest_cache.py:98: DeprecationWarning: Please use assertTrue instead.
  self.assert_('foo' not in list(self.cache.keys()), "Element 'foo' was not removed cache dictionnary")
unittest_cache.py:99: DeprecationWarning: Please use assertTrue instead.
  self.assert_('foo' not in self.cache._usage, "Element 'foo' was not removed usage list")
E..unittest_cache.py:72: DeprecationWarning: Please use assertTrue instead.
  'key 1 has not been suppressed from the cache dictionnary')
unittest_cache.py:74: DeprecationWarning: Please use assertTrue instead.
  'key 1 has not been suppressed from the cache LRU list')
EEEEE
======================================================================
ERROR: test_delitem (unittest_cache.CacheTestCase)
Checks that elements are removed from both element dict and element
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 100, in test_delitem
    self.assertItemsEqual(self.cache._usage,
AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual'

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_recycling1 (unittest_cache.CacheTestCase)
Checks the removal of old elements
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 77, in test_recycling1
    self.assertItemsEqual(self.cache._usage,
AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual'

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_recycling2 (unittest_cache.CacheTestCase)
Checks that accessed elements get in the front of the list
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 89, in test_recycling2
    self.assertItemsEqual(self.cache._usage,
AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual'

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_setitem1 (unittest_cache.CacheTestCase)
Checks that the setitem method works
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 36, in test_setitem1
    self.assertItemsEqual(self.cache._usage,
AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual'

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_setitem2 (unittest_cache.CacheTestCase)
Checks that the setitem method works for multiple items
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 50, in test_setitem2
    self.assertItemsEqual(self.cache._usage,
AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual'

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_setitem3 (unittest_cache.CacheTestCase)
Checks that the setitem method works when replacing an element in the cache
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 60, in test_setitem3
    self.assertItemsEqual(self.cache._usage,
AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual'

                              no stdout                               
                              no stderr                               
====================  unittest_ureports_text.py  =====================
.......
======================  unittest_taskqueue.py  =======================
.....
========================  unittest_graph.py  =========================
..............
========================  unittest_table.py  =========================
..........unittest_table.py:333: DeprecationWarning: Please use assertTrue instead.
  self.assert_(int(val) == 11)
.unittest_table.py:345: DeprecationWarning: Please use assertTrue instead.
  self.assert_(val == 22)
.unittest_table.py:311: DeprecationWarning: Please use assertTrue instead.
  self.assert_(int(val) == 15)
.unittest_table.py:321: DeprecationWarning: Please use assertTrue instead.
  self.assert_(val == 30)
..........unittest_table.py:68: DeprecationWarning: Please use assertTrue instead.
  self.assert_(self.table[0] == self.table.data[0])
unittest_table.py:69: DeprecationWarning: Please use assertTrue instead.
  self.assert_(self.table[1] == self.table.data[1])
...unittest_table.py:74: DeprecationWarning: Please use assertTrue instead.
  self.assert_(next(it) == self.table.data[0])
unittest_table.py:75: DeprecationWarning: Please use assertTrue instead.
  self.assert_(next(it) == self.table.data[1])
.E.........
======================================================================
ERROR: test_pprint (unittest_table.TableTC)
only tests pprint doesn't raise an exception
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_table.py", line 209, in test_pprint
    self.table.pprint()
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/table.py", line 443, in pprint
    col_names_line.append(col_name.encode('iso-8859-1') + ' '*5)
TypeError: can't concat bytes to str

                              no stdout                               
                              no stderr                               
======================  unittest_textutils.py  =======================
.........................................
======================  unittest_fileutils.py  =======================
unittest_fileutils.py:76: DeprecationWarning: Please use assertTrue instead.
  self.assert_(exists(join(self.tempdir, '__init__.py')))
unittest_fileutils.py:77: DeprecationWarning: Please use assertTrue instead.
  self.assert_(exists(join(self.tempdir, 'sub')))
unittest_fileutils.py:78: DeprecationWarning: Please use assertTrue instead.
  self.assert_(not exists(join(self.tempdir, '__init__.pyc')))
unittest_fileutils.py:79: DeprecationWarning: Please use assertTrue instead.
  self.assert_(not exists(join(self.tempdir, 'CVS')))
.......Funittest_fileutils.py:56: ResourceWarning: unclosed file 
  data = open(NEWLINES_TXT, 'U').read()
.unittest_fileutils.py:97: DeprecationWarning: Please use assertTrue instead.
  self.assert_(not os.stat(self.rpath).st_mode & S_IWRITE)
unittest_fileutils.py:99: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.stat(self.rpath).st_mode & S_IWRITE)
unittest_fileutils.py:100: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.access(self.rpath, os.W_OK))
unittest_fileutils.py:102: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.stat(self.rwpath).st_mode & S_IWRITE)
unittest_fileutils.py:103: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.access(self.rwpath, os.W_OK))
unittest_fileutils.py:105: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.stat(self.rwpath).st_mode & S_IWRITE)
unittest_fileutils.py:106: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.access(self.rwpath, os.W_OK))
.unittest_fileutils.py:126: DeprecationWarning: Please use assertTrue instead.
  self.assert_(not os.stat(self.rpath).st_mode & S_IWRITE)
unittest_fileutils.py:128: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.access(self.rpath, os.W_OK))
unittest_fileutils.py:129: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.stat(self.rpath).st_mode & S_IWRITE)
unittest_fileutils.py:132: DeprecationWarning: Please use assertTrue instead.
  self.assert_(not os.stat(self.rpath).st_mode & S_IWRITE)
.unittest_fileutils.py:112: DeprecationWarning: Please use assertTrue instead.
  self.assert_(not os.stat(self.rpath).st_mode & S_IWRITE)
unittest_fileutils.py:115: DeprecationWarning: Please use assertTrue instead.
  self.assert_(not os.stat(self.rpath).st_mode & S_IWRITE)
unittest_fileutils.py:117: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.access(self.rwpath, os.W_OK))
unittest_fileutils.py:118: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.stat(self.rwpath).st_mode & S_IWRITE)
unittest_fileutils.py:120: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.access(self.rwpath, os.W_OK))
unittest_fileutils.py:121: DeprecationWarning: Please use assertTrue instead.
  self.assert_(os.stat(self.rwpath).st_mode & S_IWRITE)
.
======================================================================
FAIL: relative_path (logilab.common.fileutils)
Doctest: logilab.common.fileutils.relative_path
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/usr/lib/python3.2/doctest.py", line 2153, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for logilab.common.fileutils.relative_path
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/fileutils.py", line 180, in relative_path

----------------------------------------------------------------------
File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/fileutils.py", line 203, in logilab.common.fileutils.relative_path
Failed example:
    relative_path( from_file='/index.html', to_file='toto/index.html')
Expected:
    Traceback (most recent call last):
      File "", line 1, in ?
      File "", line 37, in relative_path
    UnresolvableError
Got:
    Traceback (most recent call last):
      File "/usr/lib/python3.2/doctest.py", line 1288, in __run
        compileflags, 1), test.globs)
      File "", line 1, in 
        relative_path( from_file='/index.html', to_file='toto/index.html')
      File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/fileutils.py", line 231, in relative_path
        raise UnresolvableError()
    logilab.common.fileutils.UnresolvableError


                              no stdout                               
                              no stderr                               
======================  unittest_interface.py  =======================
.....
=======================  unittest_testlib.py  ========================
........./home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:646: DeprecationWarning: Please use assertTrue instead.
  testfunc(*args, **kwargs)
...........F.......................................................unittest_testlib.py:180: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.assertDirEqual(ed1, ed2)
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:1029: DeprecationWarning: Please use assertTrue instead.
  (ipath_a, path_a, ipath_b, path_b))
unittest_testlib.py:181: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.assertDirEqual(ref, ref)
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:1059: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  osp.join(path_b, ipath_b, ifiles_b[index]))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
unittest_testlib.py:182: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.assertDirEqual( ref, same)
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:1150: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  callableObj(*args, **kwargs)
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
unittest_testlib.py:187: ResourceWarning: unclosed file 
  self.assertRaises(AssertionError, self.assertDirEqual, ref, content_differ)
unittest_testlib.py:187: ResourceWarning: unclosed file 
  self.assertRaises(AssertionError, self.assertDirEqual, ref, content_differ)
..unittest_testlib.py:165: ResourceWarning: unclosed file 
  self.assertRaises(AssertionError, self.tc.assertFileEqual, foo, spam)
unittest_testlib.py:165: ResourceWarning: unclosed file 
  self.assertRaises(AssertionError, self.tc.assertFileEqual, foo, spam)
unittest_testlib.py:166: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.tc.assertFileEqual(foo, foo)
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file 
  msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2))
.........unittest_testlib.py:193: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.tc.assertStreamEqual(stream1, stream1)
unittest_testlib.py:194: ResourceWarning: unclosed file 
  stream1 = open(foo)
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:646: ResourceWarning: unclosed file 
  testfunc(*args, **kwargs)
/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:646: ResourceWarning: unclosed file 
  testfunc(*args, **kwargs)
.unittest_testlib.py:213: ResourceWarning: unclosed file 
  text1 = open(foo).read()
unittest_testlib.py:216: ResourceWarning: unclosed file 
  text2 = open(spam).read()
.EEEunittest_testlib.py:119: DeprecationWarning: Non-standard: please copy test method to your TestCase class
  self.tc.assertXMLStringWellFormed(valid)
...
======================================================================
ERROR: test_unordered_equality_for_dicts (unittest_testlib.TestlibTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_testlib.py", line 143, in test_unordered_equality_for_dicts
    self.assertRaises(AssertionError, self.tc.assertItemsEqual, d1, d2)
AttributeError: 'MockTestCase' object has no attribute 'assertItemsEqual'

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_unordered_equality_for_iterables (unittest_testlib.TestlibTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_testlib.py", line 155, in test_unordered_equality_for_iterables
    self.assertRaises(AssertionError, self.tc.assertItemsEqual, range(5), range(6))
AttributeError: 'MockTestCase' object has no attribute 'assertItemsEqual'

                              no stdout                               
                              no stderr                               
======================================================================
ERROR: test_unordered_equality_for_lists (unittest_testlib.TestlibTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_testlib.py", line 127, in test_unordered_equality_for_lists
    self.assertRaises(AssertionError, self.tc.assertItemsEqual, l1, l2)
AttributeError: 'MockTestCase' object has no attribute 'assertItemsEqual'

                              no stdout                               
                              no stderr                               
======================================================================
FAIL: test_tagged_class (unittest_testlib.TagTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_testlib.py", line 799, in test_tagged_class
    self.assertTrue(runner.does_match_tags(cls.test_one))
  File "/usr/lib/python3.2/unittest/case.py", line 506, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true

                              no stdout                               
                              no stderr                               
====================  unittest_ureports_html.py  =====================
.......
========================  unittest_compat.py  ========================
....
=======================  unittest_registry.py  =======================
..........
*******************************************************************************
Ran 413 test cases in 11.71s (0.41s CPU), 19 errors, 3 failures, 22 skipped
15 modules OK (8 failed)
failures: /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_decorators [2/12], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_date [2/45], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_shellutils [2/23], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_umessage [4/4], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache [6/8], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_table [1/37], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_fileutils [1/12], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_testlib [4/95]
sys:1: ResourceWarning: unclosed file 
Thanks,
Sandro
priorityimportant
typebug
done in0.58.3
load left0.000
closed by#bd15ee92a347 python3: fix code and test so most tests go green. Partially closes #104047, #a93679c86bfd Properly fix @monkeypatch by changing its contract. Actually closes #104047, #8d13747da834 [py3k @cached] fix compat of dark corners for the @monkeypatch decorator, making tests pass. Closes #104047