Marton Greber has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19633
Change subject: [Python] Refactor tests to use assertRaisesRegex ...................................................................... [Python] Refactor tests to use assertRaisesRegex Currently assertRaises(<error type>) is used in the Python client tests, to assert the type of a given error. This patch refactors usages of assertRaises() to assertRaisesRegex(<error type>, <message pattern>) in order to assert the error message as well. In Python2 the function is named assertRaisesRegexp, whereas in Python3 it has been renamed to assertRaisesRegex (without the trailing 'p'). To be able to use assertRaisesRegex throughout the Python codebase, a compatibility class called CompatUnittest is added, to handle this issue. Change-Id: I41e2d69996ee0ed0f0418ae184d95239f2739efb --- M python/kudu/compat.py M python/kudu/tests/test_client.py M python/kudu/tests/test_scanner.py M python/kudu/tests/test_scantoken.py M python/kudu/tests/test_schema.py M python/kudu/tests/util.py 6 files changed, 94 insertions(+), 49 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/33/19633/1 -- To view, visit http://gerrit.cloudera.org:8080/19633 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I41e2d69996ee0ed0f0418ae184d95239f2739efb Gerrit-Change-Number: 19633 Gerrit-PatchSet: 1 Gerrit-Owner: Marton Greber <[email protected]>
