From c2936b786a18a99eb657a4b32a0694c3a4bcc82a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tarek=20Ziad=C3=A9?= Date: Sat, 11 Apr 2009 15:14:17 +0000 Subject: [PATCH] testing a full check case --- Lib/distutils/command/check.py | 2 +- Lib/distutils/tests/test_check.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Lib/distutils/command/check.py b/Lib/distutils/command/check.py index c72914952e..d164f3f527 100644 --- a/Lib/distutils/command/check.py +++ b/Lib/distutils/command/check.py @@ -65,7 +65,7 @@ class check(Command): if self.metadata: self.check_metadata() if self.restructuredtext: - if docutils: + if HAS_DOCUTILS: self.check_restructuredtext() elif self.strict: raise DistutilsSetupError('The docutils package is needed.') diff --git a/Lib/distutils/tests/test_check.py b/Lib/distutils/tests/test_check.py index 443fa35baf..5e0c453140 100644 --- a/Lib/distutils/tests/test_check.py +++ b/Lib/distutils/tests/test_check.py @@ -85,6 +85,13 @@ class CheckTestCase(support.LoggingSilencer, cmd.check_restructuredtext() self.assertEquals(cmd._warnings, 0) + def test_check_all(self): + + metadata = {'url': 'xxx', 'author': 'xxx'} + self.assertRaises(DistutilsSetupError, self._run, + {}, **{'strict': 1, + 'restructuredtext': 1}) + def test_suite(): return unittest.makeSuite(CheckTestCase) -- 2.50.1