diff options
author | Nigel Babu <nigelb@redhat.com> | 2016-12-20 12:52:25 +0530 |
---|---|---|
committer | Nigel Babu <nigelb@redhat.com> | 2017-02-01 12:48:22 +0530 |
commit | ed2dfbe2e0b10a8595d0161dbb2190f0f702c0ab (patch) | |
tree | 3061897b209ff46f65ca97dd37c6fb05a539560e /tests/functional/bvt | |
parent | 86f5e76e38e6aefce88917ee88c2eeaf18431046 (diff) |
Raise custom exceptions rather assert failures
The setup should never raise an assert failure in a test. Only tests
should fail an assert. If an essential test setup doesn't work, we
should be raising custom exceptions instead.
Change-Id: I6d5cce448132b71b6fde3a39fef894be8b1216d3
Signed-off-by: Nigel Babu <nigelb@redhat.com>
Diffstat (limited to 'tests/functional/bvt')
-rw-r--r-- | tests/functional/bvt/test_bvt_lite_and_plus.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/functional/bvt/test_bvt_lite_and_plus.py b/tests/functional/bvt/test_bvt_lite_and_plus.py index 55db725b9..074d57910 100644 --- a/tests/functional/bvt/test_bvt_lite_and_plus.py +++ b/tests/functional/bvt/test_bvt_lite_and_plus.py @@ -45,7 +45,8 @@ class BvtTestsClass(GlusterVolumeBaseClass): "scripts/file_dir_ops.py") cls.script_upload_path = "/tmp/file_dir_ops.py" ret = os.path.exists(cls.script_local_path) - assert (ret is True), ("Unable to find the io scripts") + if not ret: + raise Exception("Unable to find the io scripts") for client in cls.clients: g.upload(client, cls.script_local_path, cls.script_upload_path) |