Opened 9 years ago

Closed 9 years ago

#5967 enhancement closed fixed (fixed)

Port `twisted.internet.test.reactormixins` to Python 3

Reported by: Jean-Paul Calderone Owned by: Jean-Paul Calderone
Priority: normal Milestone: Python 3.3 Minimal
Component: core Keywords: tests
Cc: Branch: branches/reactormixins-python3-5967
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun


This module is the basis of a decent sized chunk of the test suite for the reactor implementations. Porting it to Python 3 is a necessary precondition to being able to run that part of the test suite on Python 3, and therefore a precondition for being able to port the reactors to Python 3.

Change History (6)

comment:1 Changed 9 years ago by Jean-Paul Calderone

Author: exarkun
Branch: branches/reactormixins-python3-5967

(In [35593]) Branching to 'reactormixins-python3-5967'

comment:2 Changed 9 years ago by Jean-Paul Calderone

Keywords: review added
Owner: changed from Jean-Paul Calderone to Itamar Turner-Trauring

Moved some code around. Adjusted some imports. Removed use of assertFailure from, to work with change from TestCase to SynchronousTestCase in Build results

comment:3 Changed 9 years ago by Jean-Paul Calderone

(In [35606]) Switch another instance of assertFailure to manual Failure checking

refs #5967

comment:4 Changed 9 years ago by Itamar Turner-Trauring

Keywords: review removed
Owner: changed from Itamar Turner-Trauring to Jean-Paul Calderone
  1. filter() is lazy in Python 3, it seems.
  2. Given the above wouldn't have been caught by anything, we should open a ticket for writing tests for ReactorBuilder. Especially since I want to expose some of this infrastructure, to allow users to write tests that have a reactor per-test (unless we have a full fake reactor that'll be ready soon).
  3. Given we've both implemented variations, possibly SyncTestCase should have a sync version of assertFailure? Or maybe the use cases are sufficiently diverse that there's no point.
  4. Add future imports.

Please fix, and merge.

comment:5 Changed 9 years ago by Jean-Paul Calderone

(In [35611]) Avoid lazy filter. Also fix __all__ definition.

refs #5967

comment:6 Changed 9 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [35614]) Merge reactormixins-python3-5967

Author: exarkun Reviewer: itamar Fixes: #5967

Port twisted.internet.test.reactormixins to Python 3, in anticipation of porting some tests based on it to Python 3.

Note: See TracTickets for help on using tickets.