This is an archive of the discontinued LLVM Phabricator instance.

python compat - assertraisesregex
ClosedPublic

Authored by serge-sans-paille on Jan 3 2019, 3:19 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

michaelplatings requested changes to this revision.Jan 3 2019, 5:06 AM
michaelplatings added inline comments.
bindings/python/llvm/tests/base.py
21 ↗(On Diff #180014)

I think this should be:
assertRaisesRegex = unittest.TestCase.assertRaisesRegexp

This revision now requires changes to proceed.Jan 3 2019, 5:06 AM
serge-sans-paille marked an inline comment as done.Jan 3 2019, 5:42 AM
serge-sans-paille added inline comments.
bindings/python/llvm/tests/base.py
21 ↗(On Diff #180014)

Well It's actually the same as TestBase inherits from unittest.TestCase.

I prefer this form because it makes the renaming more explicit.

michaelplatings added inline comments.Jan 3 2019, 5:52 AM
bindings/python/llvm/tests/base.py
21 ↗(On Diff #180014)

Doesn't work for me:
NameError: name 'TestBase' is not defined

This revision is now accepted and ready to land.Jan 3 2019, 6:01 AM
This revision was automatically updated to reflect the committed changes.