Added a try/finally block. The snarfer test still needs one added.

This commit is contained in:
Jeremy Fincher 2004-02-09 03:03:22 +00:00
parent ea2f4a55ca
commit 915d4674e3

View File

@ -85,7 +85,7 @@ if network:
n = re.search('#(\d+)', m.args[1]).group(1)
self.assertNotError('rfe --open gaim %s' % n)
'''
"""
Just assume pending works since we're not 99% guaranteed to have a
project that has pending bugs/rfes like we do with the others.
def testPending(self):
@ -97,7 +97,7 @@ if network:
self.failUnless(m, 'No response from Sourceforge.')
n = re.search('#(\d+)', m.args[1]).group(1)
self.assertNotError('rfe --pending gaim %s' % n)
'''
"""
def testBugs(self):
self.assertHelp('bugs')
@ -127,6 +127,8 @@ if network:
def testDefaultproject(self):
self.assertHelp('bugs')
try:
original = conf.supybot.plugins.Sourceforge.project()
conf.supybot.plugins.Sourceforge.project.set('supybot')
self.assertNotError('bugs')
m = self.getMsg('bugs')
@ -134,7 +136,8 @@ if network:
self.assertNotError('bug supybot %s' % n)
# This should have the same effect as calling 'bug supybot %s'
self.assertNotError('bug %s' % n)
conf.supybot.plugins.Sourceforge.project.set('')
finally:
conf.supybot.plugins.Sourceforge.project.set(original)
def testSnarfer(self):
s = r'.*Status.*: \w+'