[tor-bugs] #9873 [BridgeDB]: Convert BridgeDB's old unittests to use twisted.trial

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Dec 18 00:19:02 UTC 2013


#9873: Convert BridgeDB's old unittests to use twisted.trial
-----------------------------+--------------------------------
     Reporter:  isis         |      Owner:  isis
         Type:  enhancement  |     Status:  needs_revision
     Priority:  normal       |  Milestone:
    Component:  BridgeDB     |    Version:
   Resolution:               |   Keywords:  bridgedb-unittests
Actual Points:               |  Parent ID:  #9865
       Points:               |
-----------------------------+--------------------------------
Changes (by isis):

 * status:  new => needs_revision


Comment:

 I've started working on this in my branch
 [https://gitweb.torproject.org/user/isis/bridgedb.git/shortlog/refs/heads/fix/9873
 -convert-old-unittests fix/9873-convert-old-unittests].

 I began setting up a system which will run the old lib/bridgedb/Tests.py
 unittests with Twisted's trial runner. The old unittests will get run
 twice, once with removed/deprecated classes and functions which have been
 taken out of BridgeDB's codebase, and again with new/refactored code; this
 way, the old unittests function as a (partial) regression test suite.

 The way I designed it, the removed/old/deprecated/original code (various
 classes/functions before I refactored them) will go into
 lib/bridgedb/test/deprecated.py, and it is
 `twisted.python.monkey.MonkeyPatch`ed into place for a run of the old
 unitests in lib/bridgedb/Tests.py. Then, the old unittests are run a
 second time with the newly refactored code, so that the difference between
 the two can be clearly seen, and bugs introduced by new code can
 (hopefully) be caught immediately.

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


More information about the tor-bugs mailing list