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 |
@@ -1,45 +1,38 b'' | |||
|
1 | 1 | {%- extends 'null.tpl' -%} |
|
2 | 2 | |
|
3 | 3 | {#display data priority#} |
|
4 | 4 | |
|
5 | 5 | |
|
6 | 6 | {%- block data_priority scoped -%} |
|
7 | 7 | {%- for type in output | filter_data_type -%} |
|
8 | 8 | {%- if type in ['pdf']%} |
|
9 | 9 | {%- block data_pdf -%} |
|
10 | ||
|
11 | 10 | {%- endblock -%} |
|
12 | 11 | {%- endif -%} |
|
13 | 12 | {%- if type in ['svg']%} |
|
14 | 13 | {%- block data_svg -%} |
|
15 | ->> svg | |
|
16 | 14 | {%- endblock -%} |
|
17 | 15 | {%- endif -%} |
|
18 | 16 | {%- if type in ['png']%} |
|
19 | 17 | {%- block data_png -%} |
|
20 | ->> png | |
|
21 | 18 | {%- endblock -%} |
|
22 | 19 | {%- endif -%} |
|
23 | 20 | {%- if type in ['html']%} |
|
24 | 21 | {%- block data_html -%} |
|
25 | ->> html | |
|
26 | 22 | {%- endblock -%} |
|
27 | 23 | {%- endif -%} |
|
28 | 24 | {%- if type in ['jpeg']%} |
|
29 | 25 | {%- block data_jpg -%} |
|
30 | ->> jpg | |
|
31 | 26 | {%- endblock -%} |
|
32 | 27 | {%- endif -%} |
|
33 | 28 | {%- if type in ['text']%} |
|
34 | 29 | {%- block data_text -%} |
|
35 | ->> text | |
|
36 | 30 | {%- endblock -%} |
|
37 | 31 | {%- endif -%} |
|
38 | 32 | |
|
39 | 33 | {%- if type in ['latex']%} |
|
40 | 34 | {%- block data_latex -%} |
|
41 | ->> latext | |
|
42 | 35 | {%- endblock -%} |
|
43 | 36 | {%- endif -%} |
|
44 | 37 | {%- endfor -%} |
|
45 | 38 | {%- endblock data_priority -%} |
@@ -1,46 +1,39 b'' | |||
|
1 | 1 | ((= autogenerated file do not edit =)) |
|
2 | 2 | ((*- extends 'null.tplx' -*)) |
|
3 | 3 | |
|
4 | 4 | ((=display data priority=)) |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | ((*- block data_priority scoped -*)) |
|
8 | 8 | ((*- for type in output | filter_data_type -*)) |
|
9 | 9 | ((*- if type in ['pdf']*)) |
|
10 | 10 | ((*- block data_pdf -*)) |
|
11 | ||
|
12 | 11 | ((*- endblock -*)) |
|
13 | 12 | ((*- endif -*)) |
|
14 | 13 | ((*- if type in ['svg']*)) |
|
15 | 14 | ((*- block data_svg -*)) |
|
16 | ->> svg | |
|
17 | 15 | ((*- endblock -*)) |
|
18 | 16 | ((*- endif -*)) |
|
19 | 17 | ((*- if type in ['png']*)) |
|
20 | 18 | ((*- block data_png -*)) |
|
21 | ->> png | |
|
22 | 19 | ((*- endblock -*)) |
|
23 | 20 | ((*- endif -*)) |
|
24 | 21 | ((*- if type in ['html']*)) |
|
25 | 22 | ((*- block data_html -*)) |
|
26 | ->> html | |
|
27 | 23 | ((*- endblock -*)) |
|
28 | 24 | ((*- endif -*)) |
|
29 | 25 | ((*- if type in ['jpeg']*)) |
|
30 | 26 | ((*- block data_jpg -*)) |
|
31 | ->> jpg | |
|
32 | 27 | ((*- endblock -*)) |
|
33 | 28 | ((*- endif -*)) |
|
34 | 29 | ((*- if type in ['text']*)) |
|
35 | 30 | ((*- block data_text -*)) |
|
36 | ->> text | |
|
37 | 31 | ((*- endblock -*)) |
|
38 | 32 | ((*- endif -*)) |
|
39 | 33 | |
|
40 | 34 | ((*- if type in ['latex']*)) |
|
41 | 35 | ((*- block data_latex -*)) |
|
42 | ->> latext | |
|
43 | 36 | ((*- endblock -*)) |
|
44 | 37 | ((*- endif -*)) |
|
45 | 38 | ((*- endfor -*)) |
|
46 | 39 | ((*- endblock data_priority -*)) |
@@ -1,18 +1,27 b'' | |||
|
1 | 1 | import io |
|
2 | 2 | import nose.tools as nt |
|
3 | 3 | import os |
|
4 | 4 | from nose.tools import nottest |
|
5 | 5 | from converters.template import ConverterTemplate |
|
6 | from IPython.config.loader import PyFileConfigLoader | |
|
7 | ||
|
8 | ||
|
6 | 9 | |
|
7 | 10 | |
|
8 | 11 | def test_evens(): |
|
9 | 12 | reflist = [ |
|
10 | 13 | 'tests/ipynbref/IntroNumPy.orig' |
|
11 | 14 | ] |
|
12 | 15 | |
|
13 | # null template should return empty | |
|
14 | C = ConverterTemplate() | |
|
15 | C.read('tests/ipynbref/IntroNumPy.orig.ipynb') | |
|
16 | result,_ = C.convert() | |
|
17 | nt.assert_equal(result,'') | |
|
16 | test_profiles = [prof for prof in os.listdir('profile/test/') if prof.endswith('.py')] | |
|
17 | ||
|
18 | ### null template should return empty | |
|
19 | for profile in test_profiles: | |
|
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