Last change
on this file since 65 was 59, checked in by Wouter Pasman, 3 years ago |
#44 manual commit of first public release, because this will cause the dist directory to move
|
File size:
1.2 KB
|
Line | |
---|
1 | import time
|
---|
2 | import unittest
|
---|
3 |
|
---|
4 | from geniusweb.partystdio.PartyStdIo import PartyStdIo
|
---|
5 | from test.geniusweb.partystdio.EmptyParty import EmptyParty
|
---|
6 |
|
---|
7 |
|
---|
8 | class PartyStdIoTest(unittest.TestCase):
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 | def testCapabilities(self):
|
---|
13 | channel = PartyStdIo(EmptyParty)
|
---|
14 | channel.capabilities()
|
---|
15 | # we really should check what is printed to stdout now...
|
---|
16 |
|
---|
17 |
|
---|
18 | def testDescription(self):
|
---|
19 | channel = PartyStdIo(EmptyParty)
|
---|
20 | channel.description()
|
---|
21 | # we really should check what is printed to stdout now...
|
---|
22 |
|
---|
23 | '''
|
---|
24 | Test if the pipe to the party correctly converts incoming test
|
---|
25 | strings to objects
|
---|
26 | '''
|
---|
27 | #FIXME
|
---|
28 | # def testPipe(self):
|
---|
29 | # channel = PartyStdIo(EmptyParty)
|
---|
30 | # r,w = os.pipe()
|
---|
31 | # inpipe = os.fdopen(r)
|
---|
32 | # outpipe=os.fdopen(w, 'w')
|
---|
33 | #
|
---|
34 | # thread = threading.Thread(target=lambda:channel.run(connend=inpipe))
|
---|
35 | # thread.start()
|
---|
36 | # time.sleep(0.5)
|
---|
37 | # outpipe.write('nonsense')
|
---|
38 | # thread.join(0.5)
|
---|
39 | # os.close(inpipe)
|
---|
40 | # os.close(outpipe)
|
---|
41 | # self.assertFalse(thread.isAlive())
|
---|
42 | |
---|
Note:
See
TracBrowser
for help on using the repository browser.