mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
merge
This commit is contained in:
commit
87d89d9714
1 changed files with 3 additions and 3 deletions
|
@ -117,7 +117,7 @@ class FailureTestCase(unittest.TestCase):
|
||||||
def fooLacksEnter():
|
def fooLacksEnter():
|
||||||
foo = LacksEnter()
|
foo = LacksEnter()
|
||||||
with foo: pass
|
with foo: pass
|
||||||
self.assertRaisesRegexp(AttributeError, '__enter__', fooLacksEnter)
|
self.assertRaisesRegex(AttributeError, '__enter__', fooLacksEnter)
|
||||||
|
|
||||||
def testEnterAttributeError2(self):
|
def testEnterAttributeError2(self):
|
||||||
class LacksEnterAndExit(object):
|
class LacksEnterAndExit(object):
|
||||||
|
@ -126,7 +126,7 @@ class FailureTestCase(unittest.TestCase):
|
||||||
def fooLacksEnterAndExit():
|
def fooLacksEnterAndExit():
|
||||||
foo = LacksEnterAndExit()
|
foo = LacksEnterAndExit()
|
||||||
with foo: pass
|
with foo: pass
|
||||||
self.assertRaisesRegexp(AttributeError, '__enter__', fooLacksEnterAndExit)
|
self.assertRaisesRegex(AttributeError, '__enter__', fooLacksEnterAndExit)
|
||||||
|
|
||||||
def testExitAttributeError(self):
|
def testExitAttributeError(self):
|
||||||
class LacksExit(object):
|
class LacksExit(object):
|
||||||
|
@ -136,7 +136,7 @@ class FailureTestCase(unittest.TestCase):
|
||||||
def fooLacksExit():
|
def fooLacksExit():
|
||||||
foo = LacksExit()
|
foo = LacksExit()
|
||||||
with foo: pass
|
with foo: pass
|
||||||
self.assertRaisesRegexp(AttributeError, '__exit__', fooLacksExit)
|
self.assertRaisesRegex(AttributeError, '__exit__', fooLacksExit)
|
||||||
|
|
||||||
def assertRaisesSyntaxError(self, codestr):
|
def assertRaisesSyntaxError(self, codestr):
|
||||||
def shouldRaiseSyntaxError(s):
|
def shouldRaiseSyntaxError(s):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue