blob: e7816337ce68eaf277e141c8cd2ccfe9fd0ae76a [file] [log] [blame]
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from libs import exceptions
def _ProblematicFunction():
raise NotImplementedError('my message') # Trigger an exception intentionally.
class ExceptionsTest(unittest.TestCase):
def testEnhanceMessage(self):
with self.assertRaisesRegexp(
('^libs/test/exceptions\_test\.py:\d+ \_ProblematicFunction '
'\$\$ my message$')):