[tor-bugs] #26420 [Core Tor/Stem]: Discuss: Testing - specify literal patterns instead of regex patterns

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jun 19 22:51:11 UTC 2018


#26420: Discuss: Testing - specify literal patterns instead of regex patterns
---------------------------+------------------------------
 Reporter:  dmr            |          Owner:  dmr
     Type:  task           |         Status:  needs_review
 Priority:  Medium         |      Milestone:
Component:  Core Tor/Stem  |        Version:
 Severity:  Normal         |     Resolution:
 Keywords:  dev testing    |  Actual Points:
Parent ID:                 |         Points:
 Reviewer:  atagar         |        Sponsor:
---------------------------+------------------------------

Comment (by atagar):

 Hi Dave. I hesitate to mention this but option would be to add an
 assertRaisesWith() method. We already wrap unittest's TextTestRunner to
 record test runtimes and add python 2.6 support for a couple methods...

 https://gitweb.torproject.org/stem.git/tree/stem/util/test_tools.py#n270

 Adding this method would be simple. The only thing that makes me hesitate
 is it's definitely non-standard.

 If you'd care to migrate Stem to a simple assertRaisesWith() method then
 feel free. Or not. Happy to go either way. :)

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


More information about the tor-bugs mailing list