Opened 2 years ago

Closed 2 years ago

#5967 enhancement closed fixed (fixed)

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

Reported by: exarkun Owned by: exarkun
Priority: normal Milestone: Python 3.3 Minimal
Component: core Keywords: tests
Cc: Branch: branches/reactormixins-python3-5967
(diff, github, buildbot, log)
Author: exarkun Launchpad Bug:

Description

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 2 years ago by exarkun

  • Author set to exarkun
  • Branch set to branches/reactormixins-python3-5967

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

comment:2 Changed 2 years ago by exarkun

  • Keywords review added
  • Owner changed from exarkun to itamar

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

comment:3 Changed 2 years ago by exarkun

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

refs #5967

comment:4 Changed 2 years ago by itamar

  • Keywords review removed
  • Owner changed from itamar to exarkun
  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 2 years ago by exarkun

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

refs #5967

comment:6 Changed 2 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

(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.