libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [2/2] git commit: Fix broken test and invalid variable declarations.
Date Tue, 19 Aug 2014 17:15:58 GMT
Fix broken test and invalid variable declarations.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/3eaa60bc
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/3eaa60bc
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/3eaa60bc

Branch: refs/heads/trunk
Commit: 3eaa60bc232b05b01ce34c9a541374dbceb34942
Parents: 2bd3344
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Tue Aug 19 19:10:33 2014 +0200
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Tue Aug 19 19:10:33 2014 +0200

----------------------------------------------------------------------
 libcloud/test/test_connection.py | 7 +++++++
 libcloud/utils/py3.py            | 8 ++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/3eaa60bc/libcloud/test/test_connection.py
----------------------------------------------------------------------
diff --git a/libcloud/test/test_connection.py b/libcloud/test/test_connection.py
index b5c2abb..75d63fd 100644
--- a/libcloud/test/test_connection.py
+++ b/libcloud/test/test_connection.py
@@ -25,10 +25,14 @@ from libcloud.common.base import Connection
 from libcloud.common.base import LoggingConnection
 from libcloud.httplib_ssl import LibcloudBaseConnection
 from libcloud.httplib_ssl import LibcloudHTTPConnection
+from libcloud.utils.py3 import PY26
 
 
 class BaseConnectionClassTestCase(unittest.TestCase):
     def test_parse_proxy_url(self):
+        if PY26:
+            return
+
         conn = LibcloudBaseConnection()
 
         proxy_url = 'http://127.0.0.1:3128'
@@ -50,6 +54,9 @@ class BaseConnectionClassTestCase(unittest.TestCase):
                                 proxy_url=proxy_url)
 
     def test_constructor(self):
+        if PY26:
+            return
+
         conn = LibcloudHTTPConnection(host='localhost', port=80)
         self.assertEqual(conn.proxy_scheme, None)
         self.assertEqual(conn.proxy_host, None)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/3eaa60bc/libcloud/utils/py3.py
----------------------------------------------------------------------
diff --git a/libcloud/utils/py3.py b/libcloud/utils/py3.py
index 1f7d229..2e4fc38 100644
--- a/libcloud/utils/py3.py
+++ b/libcloud/utils/py3.py
@@ -30,6 +30,7 @@ except ImportError:
 
 PY2 = False
 PY25 = False
+PY26 = False
 PY27 = False
 PY3 = False
 PY32 = False
@@ -37,10 +38,13 @@ PY32 = False
 if sys.version_info >= (2, 0) and sys.version_info < (3, 0):
     PY2 = True
 
-if sys.version_info >= (2, 5) and sys.version_info <= (2, 6):
+if sys.version_info >= (2, 5) and sys.version_info < (2, 6):
     PY25 = True
 
-if sys.version_info >= (2, 7) and sys.version_info <= (2, 8):
+if sys.version_info >= (2, 6) and sys.version_info < (2, 7):
+    PY26 = True
+
+if sys.version_info >= (2, 7) and sys.version_info < (2, 8):
     PY27 = True
 
 if sys.version_info >= (3, 0):


Mime
View raw message