mirror of
https://github.com/ceph/s3-tests.git
synced 2025-05-13 15:18:16 +00:00
Move test_s3 into s3tests.functional, so it can be split to multiple files nicely.
This commit is contained in:
parent
e253e328a7
commit
e9ad6f7ee6
6 changed files with 1 additions and 1 deletions
14
s3tests/functional/utils.py
Normal file
14
s3tests/functional/utils.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
def assert_raises(excClass, callableObj, *args, **kwargs):
|
||||
"""
|
||||
Like unittest.TestCase.assertRaises, but returns the exception.
|
||||
"""
|
||||
try:
|
||||
callableObj(*args, **kwargs)
|
||||
except excClass as e:
|
||||
return e
|
||||
else:
|
||||
if hasattr(excClass, '__name__'):
|
||||
excName = excClass.__name__
|
||||
else:
|
||||
excName = str(excClass)
|
||||
raise AssertionError("%s not raised" % excName)
|
Loading…
Add table
Add a link
Reference in a new issue