fix tests for python 2.6, importing unittest2 if necessary

This commit is contained in:
Simon
2012-11-22 13:59:42 +01:00
parent 602e60453d
commit 4ffe0701fa
2 changed files with 10 additions and 2 deletions

View File

@@ -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

View File

@@ -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