From 95131f27766fb2afa4b0743dcb83e7d1eaa2cb77 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Fri, 12 Mar 2010 03:37:03 +0100 Subject: [PATCH] Just in case there is no gc module. --HG-- branch : trunk --- jinja2/testsuite/loader.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jinja2/testsuite/loader.py b/jinja2/testsuite/loader.py index a46bda2..e6a552a 100644 --- a/jinja2/testsuite/loader.py +++ b/jinja2/testsuite/loader.py @@ -9,7 +9,6 @@ :license: BSD, see LICENSE for more details. """ import os -import gc import sys import time import tempfile @@ -134,7 +133,13 @@ class ModuleLoaderTestCase(JinjaTestCase): # unset all, ensure the module is gone from sys.modules self.mod_env = tmpl = None - gc.collect() + + try: + import gc + gc.collect() + except: + pass + assert name not in sys.modules -- 2.26.2