Use proper skip instead of reporting success in one distutils test

This commit is contained in:
Éric Araujo 2012-12-08 22:30:47 -05:00
parent 2320fa08a8
commit 9e06e8d5de
1 changed files with 1 additions and 7 deletions

View File

@ -194,6 +194,7 @@ class RegisterTestCase(PyPIRCCommandTestCase):
self.assertEqual(headers['Content-length'], '290') self.assertEqual(headers['Content-length'], '290')
self.assertTrue('tarek' in req.data) self.assertTrue('tarek' in req.data)
@unittest.skipUnless(docutils is not None, 'needs docutils')
def test_strict(self): def test_strict(self):
# testing the script option # testing the script option
# when on, the register command stops if # when on, the register command stops if
@ -206,13 +207,6 @@ class RegisterTestCase(PyPIRCCommandTestCase):
cmd.strict = 1 cmd.strict = 1
self.assertRaises(DistutilsSetupError, cmd.run) self.assertRaises(DistutilsSetupError, cmd.run)
# we don't test the reSt feature if docutils
# is not installed
try:
import docutils
except ImportError:
return
# metadata are OK but long_description is broken # metadata are OK but long_description is broken
metadata = {'url': 'xxx', 'author': 'xxx', metadata = {'url': 'xxx', 'author': 'xxx',
'author_email': u'éxéxé', 'author_email': u'éxéxé',