Show More
@@ -1,39 +1,38 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Module with tests for the coalescestreams transformer |
|
2 | Module with tests for the coalescestreams transformer | |
3 | """ |
|
3 | """ | |
4 |
|
4 | |||
5 | #----------------------------------------------------------------------------- |
|
5 | #----------------------------------------------------------------------------- | |
6 | # Copyright (c) 2013, the IPython Development Team. |
|
6 | # Copyright (c) 2013, the IPython Development Team. | |
7 | # |
|
7 | # | |
8 | # Distributed under the terms of the Modified BSD License. |
|
8 | # Distributed under the terms of the Modified BSD License. | |
9 | # |
|
9 | # | |
10 | # The full license is in the file COPYING.txt, distributed with this software. |
|
10 | # The full license is in the file COPYING.txt, distributed with this software. | |
11 | #----------------------------------------------------------------------------- |
|
11 | #----------------------------------------------------------------------------- | |
12 |
|
12 | |||
13 | #----------------------------------------------------------------------------- |
|
13 | #----------------------------------------------------------------------------- | |
14 | # Imports |
|
14 | # Imports | |
15 | #----------------------------------------------------------------------------- |
|
15 | #----------------------------------------------------------------------------- | |
16 |
|
16 | |||
17 | from .base import TransformerTestsBase |
|
17 | from .base import TransformerTestsBase | |
18 | from ..coalescestreams import coalesce_streams |
|
18 | from ..coalescestreams import coalesce_streams | |
19 |
|
19 | |||
20 |
|
20 | |||
21 | #----------------------------------------------------------------------------- |
|
21 | #----------------------------------------------------------------------------- | |
22 | # Class |
|
22 | # Class | |
23 | #----------------------------------------------------------------------------- |
|
23 | #----------------------------------------------------------------------------- | |
24 |
|
24 | |||
25 | class TestCoalesceStreams(TransformerTestsBase): |
|
25 | class TestCoalesceStreams(TransformerTestsBase): | |
26 | """Contains test functions for coalescestreams.py""" |
|
26 | """Contains test functions for coalescestreams.py""" | |
27 |
|
27 | |||
28 | def test_coalesce_streams(self): |
|
28 | def test_coalesce_streams(self): | |
29 | """coalesce_streams transformer output test""" |
|
29 | """coalesce_streams transformer output test""" | |
30 | nb = self.build_notebook() |
|
30 | nb = self.build_notebook() | |
31 | res = self.build_resources() |
|
31 | res = self.build_resources() | |
32 | nb, res = transformer(nb, res) |
|
|||
33 | nb, res = coalesce_streams(nb, res) |
|
32 | nb, res = coalesce_streams(nb, res) | |
34 | outputs = nb.worksheets[0].cells[0].outputs |
|
33 | outputs = nb.worksheets[0].cells[0].outputs | |
35 | self.assertEqual(outputs[0].text, "a") |
|
34 | self.assertEqual(outputs[0].text, "a") | |
36 | self.assertEqual(outputs[1].output_type, "text") |
|
35 | self.assertEqual(outputs[1].output_type, "text") | |
37 | self.assertEqual(outputs[2].text, "cd") |
|
36 | self.assertEqual(outputs[2].text, "cd") | |
38 | self.assertEqual(outputs[3].text, "ef") |
|
37 | self.assertEqual(outputs[3].text, "ef") | |
39 | No newline at end of file |
|
38 |
General Comments 0
You need to be logged in to leave comments.
Login now