##// END OF EJS Templates
run some more test...
Matthias BUSSONNIER -
Show More
@@ -0,0 +1,5 b''
1 c = get_config()
2
3 load_subconfig('null.py')
4
5 c.ConverterTemplate.template_file='display_priority'
@@ -0,0 +1,8 b''
1 c = get_config()
2
3
4 c.ConverterTemplate.extract_figures=False
5 c.ConverterTemplate.template_file='null'
6 c.ConverterTemplate.tex_environement=False
7
8 c.ExtractFigureTransformer.enabled = False
@@ -7,38 +7,31 b''
7 {%- for type in output | filter_data_type -%}
7 {%- for type in output | filter_data_type -%}
8 {%- if type in ['pdf']%}
8 {%- if type in ['pdf']%}
9 {%- block data_pdf -%}
9 {%- block data_pdf -%}
10 ->> pdf
11 {%- endblock -%}
10 {%- endblock -%}
12 {%- endif -%}
11 {%- endif -%}
13 {%- if type in ['svg']%}
12 {%- if type in ['svg']%}
14 {%- block data_svg -%}
13 {%- block data_svg -%}
15 ->> svg
16 {%- endblock -%}
14 {%- endblock -%}
17 {%- endif -%}
15 {%- endif -%}
18 {%- if type in ['png']%}
16 {%- if type in ['png']%}
19 {%- block data_png -%}
17 {%- block data_png -%}
20 ->> png
21 {%- endblock -%}
18 {%- endblock -%}
22 {%- endif -%}
19 {%- endif -%}
23 {%- if type in ['html']%}
20 {%- if type in ['html']%}
24 {%- block data_html -%}
21 {%- block data_html -%}
25 ->> html
26 {%- endblock -%}
22 {%- endblock -%}
27 {%- endif -%}
23 {%- endif -%}
28 {%- if type in ['jpeg']%}
24 {%- if type in ['jpeg']%}
29 {%- block data_jpg -%}
25 {%- block data_jpg -%}
30 ->> jpg
31 {%- endblock -%}
26 {%- endblock -%}
32 {%- endif -%}
27 {%- endif -%}
33 {%- if type in ['text']%}
28 {%- if type in ['text']%}
34 {%- block data_text -%}
29 {%- block data_text -%}
35 ->> text
36 {%- endblock -%}
30 {%- endblock -%}
37 {%- endif -%}
31 {%- endif -%}
38
32
39 {%- if type in ['latex']%}
33 {%- if type in ['latex']%}
40 {%- block data_latex -%}
34 {%- block data_latex -%}
41 ->> latext
42 {%- endblock -%}
35 {%- endblock -%}
43 {%- endif -%}
36 {%- endif -%}
44 {%- endfor -%}
37 {%- endfor -%}
@@ -8,38 +8,31 b''
8 ((*- for type in output | filter_data_type -*))
8 ((*- for type in output | filter_data_type -*))
9 ((*- if type in ['pdf']*))
9 ((*- if type in ['pdf']*))
10 ((*- block data_pdf -*))
10 ((*- block data_pdf -*))
11 ->> pdf
12 ((*- endblock -*))
11 ((*- endblock -*))
13 ((*- endif -*))
12 ((*- endif -*))
14 ((*- if type in ['svg']*))
13 ((*- if type in ['svg']*))
15 ((*- block data_svg -*))
14 ((*- block data_svg -*))
16 ->> svg
17 ((*- endblock -*))
15 ((*- endblock -*))
18 ((*- endif -*))
16 ((*- endif -*))
19 ((*- if type in ['png']*))
17 ((*- if type in ['png']*))
20 ((*- block data_png -*))
18 ((*- block data_png -*))
21 ->> png
22 ((*- endblock -*))
19 ((*- endblock -*))
23 ((*- endif -*))
20 ((*- endif -*))
24 ((*- if type in ['html']*))
21 ((*- if type in ['html']*))
25 ((*- block data_html -*))
22 ((*- block data_html -*))
26 ->> html
27 ((*- endblock -*))
23 ((*- endblock -*))
28 ((*- endif -*))
24 ((*- endif -*))
29 ((*- if type in ['jpeg']*))
25 ((*- if type in ['jpeg']*))
30 ((*- block data_jpg -*))
26 ((*- block data_jpg -*))
31 ->> jpg
32 ((*- endblock -*))
27 ((*- endblock -*))
33 ((*- endif -*))
28 ((*- endif -*))
34 ((*- if type in ['text']*))
29 ((*- if type in ['text']*))
35 ((*- block data_text -*))
30 ((*- block data_text -*))
36 ->> text
37 ((*- endblock -*))
31 ((*- endblock -*))
38 ((*- endif -*))
32 ((*- endif -*))
39
33
40 ((*- if type in ['latex']*))
34 ((*- if type in ['latex']*))
41 ((*- block data_latex -*))
35 ((*- block data_latex -*))
42 ->> latext
43 ((*- endblock -*))
36 ((*- endblock -*))
44 ((*- endif -*))
37 ((*- endif -*))
45 ((*- endfor -*))
38 ((*- endfor -*))
@@ -3,6 +3,9 b' import nose.tools as nt'
3 import os
3 import os
4 from nose.tools import nottest
4 from nose.tools import nottest
5 from converters.template import ConverterTemplate
5 from converters.template import ConverterTemplate
6 from IPython.config.loader import PyFileConfigLoader
7
8
6
9
7
10
8 def test_evens():
11 def test_evens():
@@ -10,9 +13,15 b' def test_evens():'
10 'tests/ipynbref/IntroNumPy.orig'
13 'tests/ipynbref/IntroNumPy.orig'
11 ]
14 ]
12
15
13 # null template should return empty
16 test_profiles = [prof for prof in os.listdir('profile/test/') if prof.endswith('.py')]
14 C = ConverterTemplate()
17
15 C.read('tests/ipynbref/IntroNumPy.orig.ipynb')
18 ### null template should return empty
16 result,_ = C.convert()
19 for profile in test_profiles:
17 nt.assert_equal(result,'')
20 loader = PyFileConfigLoader(profile, path=[os.path.join(os.getcwdu(),'profile/test')])
21 config = loader.load_config()
22 C = ConverterTemplate(config=config)
23 C.read('tests/ipynbref/IntroNumPy.orig.ipynb')
24 result,_ = C.convert()
25 nt.assert_equal(result,'')
26 ### end null test
18
27
General Comments 0
You need to be logged in to leave comments. Login now