Show More
@@ -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=True | |||
|
7 | ||||
|
8 | c.ExtractFigureTransformer.enabled = False |
@@ -1,27 +1,30 b'' | |||||
1 | import io |
|
1 | import io | |
2 | import nose.tools as nt |
|
2 | 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 |
|
6 | from IPython.config.loader import PyFileConfigLoader | |
7 |
|
7 | |||
8 |
|
8 | |||
9 |
|
9 | |||
10 |
|
10 | |||
11 | def test_evens(): |
|
11 | def test_evens(): | |
12 | reflist = [ |
|
12 | reflist = [ | |
13 | 'tests/ipynbref/IntroNumPy.orig' |
|
13 | 'tests/ipynbref/IntroNumPy.orig' | |
14 | ] |
|
14 | ] | |
15 |
|
15 | |||
16 | test_profiles = [prof for prof in os.listdir('profile/test/') if prof.endswith('.py')] |
|
16 | test_profiles = [prof for prof in os.listdir('profile/test/') if prof.endswith('.py')] | |
17 |
|
17 | |||
18 | ### null template should return empty |
|
18 | ### null template should return empty | |
19 |
for prof |
|
19 | for prof in test_profiles : | |
20 | loader = PyFileConfigLoader(profile, path=[os.path.join(os.getcwdu(),'profile/test')]) |
|
20 | yield check_null_profile,prof | |
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 |
|
21 | ### end null test | |
27 |
|
22 | |||
|
23 | def check_null_profile(profile): | |||
|
24 | loader = PyFileConfigLoader(profile, path=[os.path.join(os.getcwdu(),'profile/test')]) | |||
|
25 | config = loader.load_config() | |||
|
26 | C = ConverterTemplate(config=config) | |||
|
27 | C.read('tests/ipynbref/IntroNumPy.orig.ipynb') | |||
|
28 | result,_ = C.convert() | |||
|
29 | nt.assert_equal(result,'') | |||
|
30 |
General Comments 0
You need to be logged in to leave comments.
Login now