[tor-bugs] #14076 [Stem]: Fix tutorial_examples.py to not relay on correct ordering.

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jan 1 22:43:09 UTC 2015


#14076: Fix tutorial_examples.py to not relay on correct ordering.
-------------------------------------------------+-------------------------
 Reporter:  Foxboron                             |          Owner:  atagar
     Type:  defect                               |         Status:  new
 Priority:  normal                               |      Milestone:
Component:  Stem                                 |        Version:
 Keywords:  python, tests, tutorial, examples,   |  Actual Points:
  2, 3                                           |         Points:
Parent ID:                                       |
-------------------------------------------------+-------------------------
 https://github.com/Foxboron/stem/commit/93cfd8e31c99a2c489a9f1903bdda487c4444abb

 The tests inside tutorial_examples.py relies on the correct order, as well
 as overriding sys.stdin. This works fine on python2, but breaks on python3
 for reasons i haven't managed to track down.

 However, this can be solved easily by just returning a list instead of
 overriding sys.stdin. This makes it easier to debug, and the tests does
 not have to rely on outputting the correct order.

 This isn't ready to be merged yet, as assertListEqual got a new name on
 Python3, and i haven't found a neat way of overriding based on version
 yet.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14076>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list