[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #14945 [Stem]: Use annotations for test requirements
#14945: Use annotations for test requirements
---------------------------+------------------------
Reporter: atagar | Owner: atagar
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: Stem | Version:
Keywords: testing, easy | Actual Points:
Parent ID: | Points:
---------------------------+------------------------
Presently we have runner methods for test requirements. For example...
{{{
def test_authorities_are_up_to_date(self):
if test.runner.require_online(self):
return
elif test.runner.only_run_once(self):
return
...
}}}
We should check to see if we can switch this to an annotation...
{{{
@run_once
@require_online
def test_authorities_are_up_to_date(self):
...
}}}
Not entirely sure if we can make this work in python 2.6 (that's the
reason we have the 'return' conditional in the earlier bit). However, if
we can this would certainly make things more elegant.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14945>
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