tests randomly succeeds / fails
With the same environnement (logilab-common 1.6.3), the tox command succeeds and… fails.
➜ common tox -r
[…]
...................
===================== unittest_deprecation.py ======================
..........F
======================================================================
FAIL: test_moved (unittest_deprecation.RawInputTC)
----------------------------------------------------------------------
Traceback (most recent call last)
File "/home/schabot/src/public/logilab/common/.tox/py3/lib/python3.7/site-packages/logilab/common/testlib.py", line 498, in _proceed
testfunc(*args, **kwargs)
File "/home/schabot/src/public/logilab/common/test/unittest_deprecation.py", line 174, in test_moved
['[logilab.common] object moving_target has been moved to module data.deprecation'])
File "/usr/lib/python3.7/unittest/case.py", line 839, in assertEqual
assertion_func(first, second, msg=msg)
File "/usr/lib/python3.7/unittest/case.py", line 1045, in assertListEqual
self.assertSequenceEqual(list1, list2, msg, seq_type=list)
File "/usr/lib/python3.7/unittest/case.py", line 1027, in assertSequenceEqual
self.fail(msg)
File "/usr/lib/python3.7/unittest/case.py", line 680, in fail
raise self.failureException(msg)
AssertionError: Lists differ: ['[importlib] deprecated has been renamed an[129 chars]ion'] != ['[logilab.common] object moving_target has [34 chars]ion']
First differing element 0:
'[importlib] deprecated has been renamed an[45 chars]tead'
'[logilab.common] object moving_target has [33 chars]tion'
First list contains 1 additional elements.
First extra element 1:
'[logilab.common] object moving_target has been moved to module data.deprecation'
- ['[importlib] deprecated has been renamed and is deprecated, uses '
- 'callable_deprecated instead',
- '[logilab.common] object moving_target has been moved to module '
? ^
+ ['[logilab.common] object moving_target has been moved to module '
? ^
'data.deprecation']
no stdout
no stderr
[…]
_______________________________________________ summary ________________________________________________
ERROR: py3: commands failed
And here, the exact same command, on the exact same commit, without any modification
➜ common tox -r
[…]
Traceback (most recent call last):
File "/home/schabot/src/public/logilab/common/.tox/py3/lib/python3.7/site-packages/logilab/common/pytest.py", line 664, in run
cmd(*args)
File "/home/schabot/src/public/logilab/common/.tox/py3/lib/python3.7/site-packages/logilab/common/pytest.py", line 363, in testonedir
remove_local_modules_from_sys(testdir)
File "/home/schabot/src/public/logilab/common/.tox/py3/lib/python3.7/site-packages/logilab/common/pytest.py", line 283, in remove_local_modules_from_sys
if not osp.isabs(modfile) or modfile.startswith(testdir):
File "/home/schabot/src/public/logilab/common/.tox/py3/lib/python3.7/posixpath.py", line 66, in isabs
s = os.fspath(s)
TypeError: expected str, bytes or os.PathLike object, not NoneType
*******************************************************************************
Ran 433 test cases in 0.14s (0.14s CPU), 25 skipped
All 22 modules OK
_______________________________________________ summary ________________________________________________
py3: commands succeeded
congratulations :)
the tests succeeds (despite a TypeError…).