[PATCH] D56251: python compat - assertraisesregex

Michael Platings via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 3 05:52:56 PST 2019


michaelplatings added inline comments.


================
Comment at: bindings/python/llvm/tests/base.py:21
+    if sys.version_info.major == 2:
+        assertRaisesRegex = TestBase.assertRaisesRegexp
+
----------------
serge-sans-paille wrote:
> michaelplatings wrote:
> > I think this should be:
> > assertRaisesRegex = unittest.TestCase.assertRaisesRegexp
> Well It's actually the same as `TestBase` inherits from `unittest.TestCase`.
> 
> I prefer this form because it makes the renaming more explicit.
Doesn't work for me:
NameError: name 'TestBase' is not defined


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56251/new/

https://reviews.llvm.org/D56251





More information about the llvm-commits mailing list