summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2014-04-18 15:44:31 +0200
committerJan Safranek <jsafrane@redhat.com>2014-04-18 15:44:31 +0200
commit0d7c0d4ecbe09aef95eda0f2bbab354b45016537 (patch)
tree48ab2107974c191e1bd9798d22bbafbec0ff7d88 /src
parent325d6b526a17e278b49720abe65c3c33ed589560 (diff)
downloadopenlmi-providers-0d7c0d4ecbe09aef95eda0f2bbab354b45016537.tar.gz
openlmi-providers-0d7c0d4ecbe09aef95eda0f2bbab354b45016537.tar.xz
openlmi-providers-0d7c0d4ecbe09aef95eda0f2bbab354b45016537.zip
Avoid endless import loop in lmi.test.unittest.
lmi.test.unittest is now defined directly in lmi/test/__init__.py
Diffstat (limited to 'src')
-rw-r--r--src/python/lmi/test/__init__.py8
-rw-r--r--src/python/lmi/test/unittest.py28
2 files changed, 8 insertions, 28 deletions
diff --git a/src/python/lmi/test/__init__.py b/src/python/lmi/test/__init__.py
index 9d2a63e..7111ea5 100644
--- a/src/python/lmi/test/__init__.py
+++ b/src/python/lmi/test/__init__.py
@@ -18,3 +18,11 @@
#
# Authors: Michal Minar <miminar@redhat.com>
#
+
+# hack to use lmi.test.unittest as common module for unittest or unittest2,
+# based on python version
+import sys
+if sys.version_info[0] > 2 or sys.version_info[1] > 6:
+ import unittest
+else:
+ import unittest2 as unittest
diff --git a/src/python/lmi/test/unittest.py b/src/python/lmi/test/unittest.py
deleted file mode 100644
index 66492b8..0000000
--- a/src/python/lmi/test/unittest.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#
-# Authors: Jan Safranke <jsafrane@redhat.com>
-#
-"""
-This is a dummy module, which serves either as 'unittest' on Python >= 2.7
-or 'unittest2' on Python <= 2.6
-"""
-
-import sys
-if sys.version_info[0] > 2 or sys.version_info[1] > 6:
- from unittest import *
-else:
- from unittest2 import *