##// END OF EJS Templates
Fixed test and add fragments to the list of resets.
damianavila -
Show More
@@ -65,8 +65,8 b' class RevealHelpPreprocessor(Preprocessor):'
65 worksheet.cells[index + i].metadata.frag_number = index
65 worksheet.cells[index + i].metadata.frag_number = index
66 i += 1
66 i += 1
67 #Restart the slide_helper when the cell status is changed
67 #Restart the slide_helper when the cell status is changed
68 #to "do nothing".
68 #to other types.
69 if cell.metadata.slide_type in ['-']:
69 if cell.metadata.slide_type in ['-', 'skip', 'notes', 'fragment']:
70 worksheet.cells[index - 1].metadata.slide_helper = '-'
70 worksheet.cells[index - 1].metadata.slide_helper = '-'
71
71
72 if not isinstance(resources['reveal'], dict):
72 if not isinstance(resources['reveal'], dict):
@@ -28,11 +28,11 b' class Testrevealhelp(PreprocessorTestsBase):'
28 """Contains test functions for revealhelp.py"""
28 """Contains test functions for revealhelp.py"""
29
29
30 def build_notebook(self):
30 def build_notebook(self):
31 """Build a reveal slides notebook in memory for use with tests.
31 """Build a reveal slides notebook in memory for use with tests.
32 Overrides base in PreprocessorTestsBase"""
32 Overrides base in PreprocessorTestsBase"""
33
33
34 outputs = [nbformat.new_output(output_type="stream", stream="stdout", output_text="a")]
34 outputs = [nbformat.new_output(output_type="stream", stream="stdout", output_text="a")]
35
35
36 slide_metadata = {'slideshow' : {'slide_type': 'slide'}}
36 slide_metadata = {'slideshow' : {'slide_type': 'slide'}}
37 subslide_metadata = {'slideshow' : {'slide_type': 'subslide'}}
37 subslide_metadata = {'slideshow' : {'slide_type': 'subslide'}}
38
38
@@ -56,7 +56,7 b' class Testrevealhelp(PreprocessorTestsBase):'
56 def test_constructor(self):
56 def test_constructor(self):
57 """Can a RevealHelpPreprocessor be constructed?"""
57 """Can a RevealHelpPreprocessor be constructed?"""
58 self.build_preprocessor()
58 self.build_preprocessor()
59
59
60
60
61 def test_reveal_attribute(self):
61 def test_reveal_attribute(self):
62 """Make sure the reveal url_prefix resources is set"""
62 """Make sure the reveal url_prefix resources is set"""
@@ -82,7 +82,8 b' class Testrevealhelp(PreprocessorTestsBase):'
82
82
83 # Make sure slide end is only applied to the cells preceeding slide
83 # Make sure slide end is only applied to the cells preceeding slide
84 # cells.
84 # cells.
85 assert 'slide_helper' not in cells[1].metadata
85 assert 'slide_helper' in cells[1].metadata
86 self.assertEqual(cells[1].metadata['slide_helper'], '-')
86
87
87 # Verify 'slide-end'
88 # Verify 'slide-end'
88 assert 'slide_helper' in cells[0].metadata
89 assert 'slide_helper' in cells[0].metadata
General Comments 0
You need to be logged in to leave comments. Login now