Show More
@@ -18,18 +18,19 b' __test__ = {}' | |||||
18 |
|
18 | |||
19 | from cStringIO import StringIO |
|
19 | from cStringIO import StringIO | |
20 | import os |
|
20 | import os | |
|
21 | import sys | |||
21 |
|
22 | |||
22 | from twisted.trial import unittest |
|
23 | from twisted.trial import unittest | |
23 |
|
24 | |||
24 | from IPython.testing import decorators as dec |
|
|||
25 |
|
||||
26 | #----------------------------------------------------------------------------- |
|
25 | #----------------------------------------------------------------------------- | |
27 | # Tests |
|
26 | # Tests | |
28 | #----------------------------------------------------------------------------- |
|
27 | #----------------------------------------------------------------------------- | |
29 |
|
28 | |||
30 | class TestRedirector(unittest.TestCase): |
|
29 | class TestRedirector(unittest.TestCase): | |
31 |
|
30 | |||
32 | @dec.skip_win32 |
|
31 | if sys.platform == 'win32': | |
|
32 | skip = True | |||
|
33 | ||||
33 | def test_redirector(self): |
|
34 | def test_redirector(self): | |
34 | """Checks that the redirector can be used to do synchronous capture. |
|
35 | """Checks that the redirector can be used to do synchronous capture. | |
35 | """ |
|
36 | """ | |
@@ -50,7 +51,6 b' class TestRedirector(unittest.TestCase):' | |||||
50 | result2 = "".join("%ic\n%i\n" %(i, i) for i in range(10)) |
|
51 | result2 = "".join("%ic\n%i\n" %(i, i) for i in range(10)) | |
51 | self.assertEquals(result1, result2) |
|
52 | self.assertEquals(result1, result2) | |
52 |
|
53 | |||
53 | @dec.skip_win32 |
|
|||
54 | def test_redirector_output_trap(self): |
|
54 | def test_redirector_output_trap(self): | |
55 | """Check the greedy trapping behavior of the traps. |
|
55 | """Check the greedy trapping behavior of the traps. | |
56 |
|
56 | |||
@@ -58,7 +58,8 b' class TestRedirector(unittest.TestCase):' | |||||
58 | trap the output, but also that it does it in a gready way, that |
|
58 | trap the output, but also that it does it in a gready way, that | |
59 | is by calling the callback ASAP. |
|
59 | is by calling the callback ASAP. | |
60 | """ |
|
60 | """ | |
61 |
from IPython.kernel.core.redirector_output_trap import |
|
61 | from IPython.kernel.core.redirector_output_trap import \ | |
|
62 | RedirectorOutputTrap | |||
62 | out = StringIO() |
|
63 | out = StringIO() | |
63 | trap = RedirectorOutputTrap(out.write, out.write) |
|
64 | trap = RedirectorOutputTrap(out.write, out.write) | |
64 | try: |
|
65 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now