~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to twisted/test/stdio_test_halfclose.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-17 14:52:35 UTC
  • mfrom: (1.1.5 upstream) (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20070117145235-btmig6qfmqfen0om
Tags: 2.5.0-0ubuntu1
New upstream version, compatible with python2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.testHalfClose -*-
2
 
# Copyright (c) 2006 Twisted Matrix Laboratories.
3
 
# See LICENSE for details.
4
 
 
5
 
"""
6
 
Main program for the child process run by
7
 
L{twisted.test.test_stdio.StandardInputOutputTestCase.testHalfClose} to test
8
 
that process transports work with IHalfCloseableProtocols.
9
 
"""
10
 
 
11
 
import sys
12
 
 
13
 
from twisted.internet import stdio, protocol
14
 
from twisted.python import log, reflect
15
 
 
16
 
 
17
 
class ProducerChild(protocol.Protocol):
18
 
    _paused = False
19
 
 
20
 
#    ???
21
 
 
22
 
    def connectionLost(self, reason):
23
 
        reactor.stop()
24
 
 
25
 
 
26
 
if __name__ == '__main__':
27
 
    reflect.namedAny(sys.argv[1]).install()
28
 
    from twisted.internet import reactor
29
 
    stdio.StandardIO(ProducerChild())
30
 
    reactor.run()