Use unittest2 if available
The module backports features to Python 2.6 and 2.7. If it is available, the tests will use it. If it is not available, it will fall back to regular unittest. On Python 2.7, the tests pass anyway. On Python 2.6, there are failures with Python 2.6. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
b634a18a7f
commit
d5512fd6ff
15 changed files with 60 additions and 16 deletions
|
|
@ -2,7 +2,10 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
import unittest
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
import mock
|
||||
|
||||
import os
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue