[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #14076 [Stem]: Fix tutorial_examples.py to not relay on correct ordering.
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs