def assertReading(testCase, reactor, transport):
 if IReactorFDSet.providedBy(reactor):
  testCase.assertIn(transport, reactor.getReaders())
 else:
  testCase.assertIn(transport, reactor.handles)
  testCase.assertTrue(transport.reading)

def assertReading ( testCase , reactor , transport ) : if IReactorFDSet . providedBy ( reactor ) : testCase . assertIn ( transport , reactor . getReaders ( ) ) else : testCase . assertIn ( transport , reactor . handles ) testCase . assertTrue ( transport . reading )
use the given test to assert that the given transport is actively reading in the given reactor .