[tahoe-lafs-trac-stream] [Tahoe-LAFS] #1944: test suite should pass with -O
Tahoe-LAFS
trac at tahoe-lafs.org
Fri Jan 17 14:21:10 UTC 2020
#1944: test suite should pass with -O
------------------------+----------------------------
Reporter: daira | Owner:
Type: defect | Status: new
Priority: normal | Milestone: soon
Component: code | Version: 1.9.2
Resolution: | Keywords: test assertion
Launchpad Bug: |
------------------------+----------------------------
Old description:
> {{{
> bin/tahoe @python -O @tahoe debug trial --rterror
> [...]
> [FAIL]
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/Twisted-12.3.0-py2.7
> -linux-x86_64.egg/twisted/internet/defer.py", line 138, in maybeDeferred
> result = f(*args, **kw)
> File "/usr/local/lib/python2.7/dist-packages/Twisted-12.3.0-py2.7
> -linux-x86_64.egg/twisted/internet/_utilspy3.py", line 41, in
> runWithWarningsSuppressed
> reraise(exc_info[1], exc_info[2])
> File "/usr/local/lib/python2.7/dist-packages/Twisted-12.3.0-py2.7
> -linux-x86_64.egg/twisted/internet/_utilspy3.py", line 37, in
> runWithWarningsSuppressed
> result = f(*a, **kw)
> File
> "/home/davidsarah/tahoe/git/trunk/src/allmydata/test/test_util.py", line
> 485, in test_abspath_expanduser_unicode
> self.failUnlessRaises(AssertionError,
> fileutil.abspath_expanduser_unicode, "bytestring")
> File "/usr/local/lib/python2.7/dist-packages/Twisted-12.3.0-py2.7
> -linux-x86_64.egg/twisted/trial/_synctest.py", line 338, in assertRaises
> % (exception.__name__, result))
> twisted.trial.unittest.FailTest: AssertionError not raised
> (u'/home/davidsarah/tahoe/git/trunk/_trial_temp/bytestring' returned)
>
> allmydata.test.test_util.FileUtil.test_abspath_expanduser_unicode
> ===============================================================================
> [ERROR]
> Traceback (most recent call last):
> File
> "/home/davidsarah/tahoe/git/trunk/src/allmydata/test/common_util.py",
> line 109, in done
> (which, expected_failure, res))
> twisted.trial.unittest.FailTest: test_shares_by_server was supposed to
> raise <type 'exceptions.AssertionError'>, not get '{'1': set([1]), 's':
> set([1]), 'r': set([1]), 'e': set([1]), 'v': set([1])}'
>
> allmydata.test.test_upload.EncodingParameters.test_shares_by_server
> ===============================================================================
> [ERROR]
> Traceback (most recent call last):
> File "/home/davidsarah/tahoe/git/trunk/src/allmydata/test/common.py",
> line 1064, in done
> (which, expected_failure, res))
> twisted.trial.unittest.FailTest: test_compute_rate was supposed to raise
> <type 'exceptions.AssertionError'>, not get '-10.0'
>
> allmydata.test.test_web.Util.test_compute_rate
> allmydata.test.test_web.Util.test_compute_rate
> -------------------------------------------------------------------------------
> }}}
New description:
{{{
bin/tahoe @python -O @tahoe debug trial --rterror
[...]
[FAIL]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Twisted-12.3.0-py2.7-linux-
x86_64.egg/twisted/internet/defer.py", line 138, in maybeDeferred
result = f(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/Twisted-12.3.0-py2.7-linux-
x86_64.egg/twisted/internet/_utilspy3.py", line 41, in
runWithWarningsSuppressed
reraise(exc_info[1], exc_info[2])
File "/usr/local/lib/python2.7/dist-packages/Twisted-12.3.0-py2.7-linux-
x86_64.egg/twisted/internet/_utilspy3.py", line 37, in
runWithWarningsSuppressed
result = f(*a, **kw)
File "/home/davidsarah/tahoe/git/trunk/src/allmydata/test/test_util.py",
line 485, in test_abspath_expanduser_unicode
self.failUnlessRaises(AssertionError,
fileutil.abspath_expanduser_unicode, "bytestring")
File "/usr/local/lib/python2.7/dist-packages/Twisted-12.3.0-py2.7-linux-
x86_64.egg/twisted/trial/_synctest.py", line 338, in assertRaises
% (exception.__name__, result))
twisted.trial.unittest.FailTest: AssertionError not raised
(u'/home/davidsarah/tahoe/git/trunk/_trial_temp/bytestring' returned)
allmydata.test.test_util.FileUtil.test_abspath_expanduser_unicode
===============================================================================
[ERROR]
Traceback (most recent call last):
File
"/home/davidsarah/tahoe/git/trunk/src/allmydata/test/common_util.py", line
109, in done
(which, expected_failure, res))
twisted.trial.unittest.FailTest: test_shares_by_server was supposed to
raise <type 'exceptions.AssertionError'>, not get '{'1': set([1]), 's':
set([1]), 'r': set([1]), 'e': set([1]), 'v': set([1])}'
allmydata.test.test_upload.EncodingParameters.test_shares_by_server
===============================================================================
[ERROR]
Traceback (most recent call last):
File "/home/davidsarah/tahoe/git/trunk/src/allmydata/test/common.py",
line 1064, in done
(which, expected_failure, res))
twisted.trial.unittest.FailTest: test_compute_rate was supposed to raise
<type 'exceptions.AssertionError'>, not get '-10.0'
allmydata.test.test_web.Util.test_compute_rate
allmydata.test.test_web.Util.test_compute_rate
-------------------------------------------------------------------------------
}}}
--
Comment (by exarkun):
The way to accomplish this is to remove `assert` from the implementation
of Tahoe-LAFS since removing `assert` is primarily (solely?) the
consequence of `-O`.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1944#comment:1>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list