#28571 closed defect (fixed)

stem's doctests fail

Reported by: teor Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

  doctest...                                          **********************************************************************
File "/home/travis/build/torproject/tor/stem/stem/descriptor/remote.py", line 690, in remote.py
Failed example:
    my_router_status_entry = filter(lambda desc: desc.nickname == 'caersidi', consensus)[0]
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.4/doctest.py", line 1318, in __run
        compileflags, 1), test.globs)
      File "<doctest remote.py[2]>", line 1, in <module>
        my_router_status_entry = filter(lambda desc: desc.nickname == 'caersidi', consensus)[0]
    TypeError: 'filter' object is not subscriptable
**********************************************************************
File "/home/travis/build/torproject/tor/stem/stem/descriptor/remote.py", line 691, in remote.py
Failed example:
    print(my_router_status_entry.microdescriptor_digest)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.4/doctest.py", line 1318, in __run
        compileflags, 1), test.globs)
      File "<doctest remote.py[3]>", line 1, in <module>
        print(my_router_status_entry.microdescriptor_digest)
    NameError: name 'my_router_status_entry' is not defined
**********************************************************************
File "/home/travis/build/torproject/tor/stem/stem/descriptor/remote.py", line 694, in remote.py
Failed example:
    my_microdescriptor = stem.descriptor.remote.get_microdescriptors([my_router_status_entry.microdescriptor_digest]).run()[0]
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.4/doctest.py", line 1318, in __run
        compileflags, 1), test.globs)
      File "<doctest remote.py[4]>", line 1, in <module>
        my_microdescriptor = stem.descriptor.remote.get_microdescriptors([my_router_status_entry.microdescriptor_digest]).run()[0]
    NameError: name 'my_router_status_entry' is not defined
**********************************************************************
File "/home/travis/build/torproject/tor/stem/stem/descriptor/remote.py", line 695, in remote.py
Failed example:
    print(my_microdescriptor)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.4/doctest.py", line 1318, in __run
        compileflags, 1), test.globs)
      File "<doctest remote.py[5]>", line 1, in <module>
        print(my_microdescriptor)
    NameError: name 'my_microdescriptor' is not defined
**********************************************************************
1 items had failures:
   4 of   6 in remote.py
***Test Failed*** 4 failures.
 failed (0.10s)
test_examples                                                [FAILURE]

https://travis-ci.org/torproject/tor/jobs/458280464#L3517

Child Tickets

Change History (1)

comment:1 Changed 13 months ago by atagar

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.