python3 test failure ImportError: No module named 'exceptions'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.service |
Fix Released
|
Undecided
|
Corey Bryant |
Bug Description
This test is failing when run with python3.4
=======
FAIL: oslo_service.
oslo_service.
-------
_StringException: Empty attachments:
stderr
stdout
Traceback (most recent call last):
File "/usr/lib/
arg = patching.
File "/usr/lib/
self.target = self.getter()
File "/usr/lib/
getter = lambda: _importer(target)
File "/usr/lib/
thing = __import_
ImportError: No module named 'exceptions'
Changed in oslo.service: | |
assignee: | nobody → Corey Bryant (corey.bryant) |
Changed in oslo.service: | |
status: | Fix Committed → Fix Released |
This fixes it but there's probably something more elegant:
+if sys.version_info >= (3,0): RuntimeError" RuntimeError"
+ runtime_error = "builtins.
+else:
+ runtime_error = "exceptions.
+
class SslutilsTestCas e(base. ServiceBaseTest Case):
self. key_file_ name = os.path. join(SSL_ CERT_DIR, 'privatekey.key')
self. ca_file_ name = os.path. join(SSL_ CERT_DIR, 'ca.crt')
"""Test cases for sslutils."""
@@ -38,7 +44,7 @@
- @mock.patch( "exceptions. RuntimeError" ) runtime_ error) patch(" os.path. exists" ) enabled( self, exists_mock, runtime_ error_mock) :
+ @mock.patch(
@mock.
def test_is_