[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [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: | Owner: atagar
Foxboron | Status: new
Type: defect | Milestone:
Priority: normal | Version:
Component: Stem | Keywords: python, tests, tutorial, examples,
Resolution: | 2, 3
Actual Points: | Parent ID:
Points: |
-------------------------+-------------------------------------------------
Comment (by atagar):
> Still need to figure out how to use the correct assertCountEqual vs
assertListEqual depending on the Python version.
If it's just a matter of python versions then maybe the following?
{{{
import stem.prereq
def assert_equal_unordered(self, expected, actual):
if stem.prereq.is_python_3():
self.assertCountEqual(expected.splitlines(), actual.splitlines())
else:
self.assertListEqual(expected.splitlines(), actual.splitlines())
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14076#comment:3>
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