File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change
1
+ import pytest
1
2
import unittest
2
3
import os , sys , shutil
3
4
@@ -23,6 +24,14 @@ def captured_output():
23
24
finally :
24
25
sys .stdout , sys .stderr = old_out , old_err
25
26
27
+ try :
28
+ import jinja2
29
+ skip_jinja2 = lambda func , * args , ** kwargs : func
30
+ except ImportError :
31
+ from .pytest_patcher import mark_class
32
+ skip_jinja2 = mark_class (pytest .mark .skip (
33
+ reason = 'Skipping Jinja2 tests: jinja2 library not available' ))
34
+
26
35
class TestDemo (unittest .TestCase ):
27
36
def setUp (self ):
28
37
self .home = os .path .abspath ('_test_demo' )
@@ -73,6 +82,7 @@ def testDemoClassic(self):
73
82
def testDemoMinimal (self ):
74
83
self .run_install_demo ('../templates/minimal' , db = "sqlite" )
75
84
85
+ @skip_jinja2
76
86
def testDemoJinja (self ):
77
87
self .run_install_demo ('jinja2' , db = "anydbm" )
78
88
You can’t perform that action at this time.
0 commit comments