#2777 new task

modernize tests, use "mock" — at Initial Version

Reported by: warner Owned by:
Priority: minor Milestone: undecided
Component: code Version: 1.11.0
Keywords: Cc:
Launchpad Bug:

Description

I'd like to clean up our unit tests.. there are a lot of archaic idioms that have crept in (partly because I'm not up-to-date on modern practices, partly because the tests were initially written before those practices were established). Here are some things that come to mind:

  • use mock (which is kinda official now, added to stdlib as of py3.3) to shrink our 32 "Fake*" classes.
  • replace our home-grown self.shouldFail with t.trial.unittest.assertFailure
  • switch to inlineCallbacks to flatten the control-flow nest of helper functions

Change History (0)

Note: See TracTickets for help on using tickets.