(self, excClass)
| 97 | # removed when we drop Python 2.6 support. |
| 98 | @contextlib.contextmanager |
| 99 | def assertRaises(self, excClass): |
| 100 | try: |
| 101 | yield |
| 102 | except Exception as e: |
| 103 | assert isinstance(e, excClass) |
| 104 | else: |
| 105 | raise AssertionError("%s was not raised" % excClass) |
| 106 | |
| 107 | @contextlib.contextmanager |
| 108 | def assertRaisesRegex(self, excClass, pattern): |
no outgoing calls
no test coverage detected