[tor-bugs] #8157 [Stem]: 'test_skip_nondescriptor_contents' and 'test_non_ascii_descriptor' fails
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Feb 6 16:29:39 UTC 2013
#8157: 'test_skip_nondescriptor_contents' and 'test_non_ascii_descriptor' fails
----------------------------------+-----------------------------------------
Reporter: Abhishek Kumar Singh | Owner: atagar
Type: defect | Status: needs_information
Priority: normal | Milestone:
Component: Stem | Version:
Keywords: testing | Parent:
Points: | Actualpoints:
----------------------------------+-----------------------------------------
Changes (by atagar):
* status: new => needs_information
Comment:
Hi Abhishek. Thanks for the catches! I just checked and couldn't repro any
of these, so you'll need to take the lead with troubleshooting.
{{{
======================================================================
FAIL: test_get_stats
----------------------------------------------------------------------
Traceback:
File "/home/abhishek/checktor/stem/test/integ/util/proc.py", line 75, in
test_get_stats
self.assertTrue(float(stime) > 0)
AssertionError: False is not true
----------------------------------------------------------------------
Ran 5 tests in 0.008s
}}}
This is certainly odd. What distro are you running? If you print stime
then what is it?
{{{
Expected:
riddle,
tiny.png,
vote,
new_metrics_type
Result:
/home/abhishek/checktor/stem/test/integ/descriptor/data/riddle
(Unrecognized mime type: None),
/home/abhishek/checktor/stem/test/integ/descriptor/data/new_metrics_type
(Unrecognized mime type: None),
/home/abhishek/checktor/stem/test/integ/descriptor/data/tiny.png
(Unrecognized mime type: image/png),
/home/abhishek/checktor/stem/test/integ/descriptor/data/non-
ascii_descriptor),
/home/abhishek/checktor/stem/test/integ/descriptor/data/vote
(Unrecognized mime type: None)
}}}
This and the following test_non_ascii_descriptor failure are for the same
thing. What version of python are you using? I'm a little surprised that
I'm unable to repro this. The ending of the stacktrace...
{{{
File
"/home/abhishek/checktor/stem/stem/descriptor/server_descriptor.py", line
656, in digest
raw_descriptor = str(self)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in
position 925: ordinal not in range(128)
}}}
... is a little odd because RelayDescriptor extends ServerDescriptor,
which extends Descriptor. The Descriptor class has a __str__ method which
should simply be returning the unicode content we were constructed through
without trying to decode anything.
Cheers! -Damian
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8157#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list