Exemplo n.º 1
0
 def setUp(self):
     patch()
     # prevent cache effects when using Template("code...")
     jinja2.environment._spontaneous_environments.clear()
     # provide a dummy tracer
     self.tracer = get_dummy_tracer()
     Pin.override(jinja2.environment.Environment, tracer=self.tracer)
Exemplo n.º 2
0
 def setUp(self):
     super(Jinja2Test, self).setUp()
     patch()
     # prevent cache effects when using Template('code...')
     try:
         jinja2.environment._spontaneous_environments.clear()
     except AttributeError:
         jinja2.utils.clear_caches()
     Pin.override(jinja2.environment.Environment, tracer=self.tracer)
Exemplo n.º 3
0
 def setUp(self):
     super(Jinja2Test, self).setUp()
     patch()
     # prevent cache effects when using Template('code...')
     jinja2.environment._spontaneous_environments.clear()
     Pin.override(jinja2.environment.Environment, tracer=self.tracer)