Opened at 2015-02-05T16:08:42Z
Last modified at 2021-03-30T18:40:19Z
#2375 assigned defect
make tests work under a non-ASCII path
Reported by: | daira | Owned by: | daira |
---|---|---|---|
Priority: | normal | Milestone: | soon |
Component: | code | Version: | 1.10.0 |
Keywords: | unicode tests i18n | Cc: | |
Launchpad Bug: |
Description
Currently when I run tests for a checkout of Tahoe-LAFS (at 9ac392802b6034aefd4c742ea9dd02813f4667d9/trunk) on Linux under a directory with "€" in its name, there are many test failures:
FAILED (skips=5, expectedFailures=3, failures=2, errors=79, successes=1075)
After working around a shallow problem with os.statvfs not accepting a Unicode path, this becomes:
FAILED (skips=5, expectedFailures=3, failures=2, errors=71, successes=1083)
Most of the remaining errors have this traceback:
File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 172, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/home/davidsarah/tahoe/git/€/tahoe-lafs/src/allmydata/scripts/runner.py", line 107, in runner config.parseOptions(argv) File "/usr/lib/python2.7/dist-packages/twisted/python/usage.py", line 252, in parseOptions self._dispatch[optMangled].dispatch(optMangled, arg) File "/usr/lib/python2.7/dist-packages/twisted/python/usage.py", line 56, in dispatch raise UsageError("Parameter type enforcement failed: %s" % (e,)) twisted.python.usage.UsageError: Parameter type enforcement failed: 'ascii' codec can't encode character u'\u20ac' in position 27: ordinal not in range(128)
Change History (11)
comment:1 Changed at 2015-02-05T16:32:00Z by daira
comment:2 Changed at 2015-02-05T16:58:42Z by daira
Another 6 errors in test_auth were easily fixed. That leaves:
[FAIL] Traceback (most recent call last): File "/home/davidsarah/tahoe/git/€/tahoe-lafs/src/allmydata/test/test_system.py", line 1384, in _test_runner self.failUnlessEqual(len(descriptions), 30) File "/usr/lib/python2.7/dist-packages/twisted/trial/_synctest.py", line 356, in assertEqual % (msg, pformat(first), pformat(second))) twisted.trial.unittest.FailTest: not equal: a = 0 b = 30 allmydata.test.test_system.SystemTest.test_filesystem =============================================================================== [ERROR] Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 172, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/home/davidsarah/tahoe/git/€/tahoe-lafs/src/allmydata/scripts/runner.py", line 141, in runner rc = cli.dispatch[command](so) File "/home/davidsarah/tahoe/git/€/tahoe-lafs/src/allmydata/scripts/cli.py", line 531, in get (options.from_file, options.to_file) exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\u20ac' in position 74: ordinal not in range(128) allmydata.test.test_cli.Mv.test_mv_behavior =============================================================================== [ERROR] Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 172, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/home/davidsarah/tahoe/git/€/tahoe-lafs/src/allmydata/scripts/runner.py", line 107, in runner config.parseOptions(argv) File "/usr/lib/python2.7/dist-packages/twisted/python/usage.py", line 252, in parseOptions self._dispatch[optMangled].dispatch(optMangled, arg) File "/usr/lib/python2.7/dist-packages/twisted/python/usage.py", line 56, in dispatch raise UsageError("Parameter type enforcement failed: %s" % (e,)) twisted.python.usage.UsageError: Parameter type enforcement failed: 'ascii' codec can't encode character u'\u20ac' in position 27: ordinal not in range(128) allmydata.test.test_deepcheck.DeepCheckWebGood.test_good =============================================================================== [ERROR] Traceback (most recent call last): File "/home/davidsarah/tahoe/git/€/tahoe-lafs/src/allmydata/test/test_mutable.py", line 3150, in _debug oneshare = shares[0] # all shares should be MDMF exceptions.IndexError: list index out of range allmydata.test.test_mutable.Version.test_debug ------------------------------------------------------------------------------- Ran 1164 tests in 288.011s FAILED (skips=5, expectedFailures=3, failures=2, errors=3, successes=1151)
comment:3 Changed at 2015-02-06T00:53:53Z by daira
- Milestone changed from undecided to 1.10.1
- Status changed from new to assigned
comment:4 Changed at 2015-02-24T20:05:35Z by daira
The current work-in-progress branch for this ticket is https://github.com/tahoe-lafs/tahoe-lafs/commits/2375.tests-non-ascii.2.
comment:5 Changed at 2015-03-24T17:55:52Z by daira
The current branch is now https://github.com/tahoe-lafs/tahoe-lafs/commits/2375.tests-non-ascii.4. Still not ready for review.
comment:6 Changed at 2015-03-31T18:12:09Z by warner
The first three patches from that branch look good to me, although it might be nice to squash the first two together. The WIP patch looks like it's headed in the right direction: the non-tests parts that I looked at seemed reasonable.
comment:7 Changed at 2015-05-26T17:28:00Z by daira
- Milestone changed from 1.10.1 to 1.11.0
Not ready for 1.10.1.
comment:8 Changed at 2016-03-22T05:02:52Z by warner
- Milestone changed from 1.11.0 to 1.12.0
Milestone renamed
comment:9 Changed at 2016-06-28T18:20:37Z by warner
- Milestone changed from 1.12.0 to 1.13.0
moving most tickets from 1.12 to 1.13 so we can release 1.12 with magic-folders
comment:10 Changed at 2020-06-30T14:45:13Z by exarkun
- Milestone changed from 1.13.0 to 1.15.0
Moving open issues out of closed milestones.
comment:11 Changed at 2021-03-30T18:40:19Z by meejah
- Milestone changed from 1.15.0 to soon
Ticket retargeted after milestone closed
After fixing a missing call to unicode_to_argv in test_cli.CLITestMixin.do_cli which caused the "Parameter type enforcement failed" errors, this is down to: