From 4ffe0701fa52b2818ece66309bfe5b2133e4a7b2 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 22 Nov 2012 13:59:42 +0100 Subject: [PATCH] fix tests for python 2.6, importing unittest2 if necessary --- tests/test_gallery.py | 6 +++++- tests/test_settings.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_gallery.py b/tests/test_gallery.py index 4c347f5..6d24025 100644 --- a/tests/test_gallery.py +++ b/tests/test_gallery.py @@ -2,7 +2,11 @@ # -*- coding:utf-8 -*- import os -import unittest + +try: + import unittest2 as unittest +except ImportError: + import unittest from sigal.gallery import Gallery, get_metadata from sigal.settings import read_settings diff --git a/tests/test_settings.py b/tests/test_settings.py index ea80165..b26ab80 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -2,7 +2,11 @@ # -*- coding:utf-8 -*- import os -import unittest + +try: + import unittest2 as unittest +except ImportError: + import unittest from sigal.settings import read_settings, get_size