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