Use unittest2 where available, to support python <2.7

This commit is contained in:
sneakypete81 2013-05-11 18:11:42 +01:00
parent 7668deba43
commit 658e3ca9f1
8 changed files with 32 additions and 8 deletions

View file

@ -1,3 +1,6 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
from tests import test_albums, test_photos, test_tags

View file

@ -1,3 +1,6 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
from tests import test_base, test_albums, test_photos, test_tags

View file

@ -1,3 +1,6 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import openphoto
import test_base

View file

@ -1,5 +1,8 @@
import sys
import os
try:
import unittest2 as unittest
except ImportError:
import unittest
import logging
import openphoto

View file

@ -1,3 +1,6 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import os
import shutil

View file

@ -1,3 +1,6 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import logging
import openphoto

View file

@ -1,3 +1,6 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import openphoto
import test_base

View file

@ -1,3 +1,6 @@
try:
import unittest2 as unittest
except ImportError:
import unittest
import openphoto
import test_base