"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/unit/utils.py" between
keystone-16.0.1.tar.gz and keystone-17.0.0.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Ussuri" series (latest release).

utils.py  (keystone-16.0.1):utils.py  (keystone-17.0.0)
skipping to change at line 20 skipping to change at line 20
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
"""Useful utilities for tests.""" """Useful utilities for tests."""
import functools import functools
import os import os
import time import time
import uuid import uuid
import six
from testtools import testcase from testtools import testcase
TZ = None TZ = None
def timezone(func): def timezone(func):
@functools.wraps(func) @functools.wraps(func)
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
tz_original = os.environ.get('TZ') tz_original = os.environ.get('TZ')
try: try:
if TZ: if TZ:
skipping to change at line 80 skipping to change at line 79
>>> def test(): >>> def test():
>>> pass >>> pass
""" """
if bug: if bug:
bugstr = " (BugID " + bug + ")" bugstr = " (BugID " + bug + ")"
else: else:
bugstr = "" bugstr = ""
def _wip(f): def _wip(f):
@six.wraps(f) @functools.wraps(f)
def run_test(*args, **kwargs): def run_test(*args, **kwargs):
__e = None __e = None
try: try:
f(*args, **kwargs) f(*args, **kwargs)
except Exception as __e: except Exception as __e:
if (expected_exception != Exception and if (expected_exception != Exception and
not isinstance(__e, expected_exception)): not isinstance(__e, expected_exception)):
raise AssertionError( raise AssertionError(
'Work In Progress Test Failed%(bugstr)s with ' 'Work In Progress Test Failed%(bugstr)s with '
'unexpected exception. Expected "%(expected)s" ' 'unexpected exception. Expected "%(expected)s" '
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)