Hello Zoltan Chovan, Alexey Serbin, Attila Bukor, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/19633
to look at the new patch set (#9).
Change subject: [Python] Refactor tests to use assertRaisesRegex
......................................................................
[Python] Refactor tests to use assertRaisesRegex
The Python unittest.TestCase class offers the assertRaises() and
assertRaisesRegex() functions to test that an exception is raised when
callable is called [1].
Currently assertRaises(exception) is used in the Python
client tests, to assert the type of a given error. This patch refactors
usages of assertRaises() to assertRaisesRegex(exception, regex) in order
to assert the error message as well.
In Python3.2 assertRaisesRegexp has been renamed to assertRaisesRegex
(without the trailing 'p') [2]. To be able to use assertRaisesRegex
throughout the Python codebase, a compatibility class called
CompatUnitTest is added.
[1] https://docs.python.org/3/library/unittest.html#unittest.TestCase
[2] https://docs.python.org/3.9/library/unittest.html
#unittest.TestCase.assertRaisesRegex
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, 108 insertions(+), 51 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/33/19633/9
--
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: newpatchset
Gerrit-Change-Id: I41e2d69996ee0ed0f0418ae184d95239f2739efb
Gerrit-Change-Number: 19633
Gerrit-PatchSet: 9
Gerrit-Owner: Marton Greber <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>