summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests/test_check.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-04-17 14:29:56 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-04-17 14:29:56 (GMT)
commit783f49317394734c8e50e9e8c2aa34427e9e121e (patch)
treecd4bbd91a3461e7d195a30848676b9ee7325a942 /Lib/distutils/tests/test_check.py
parent22aa4bbdc571e2d5e71211dc7853cfe1fcaa89a7 (diff)
downloadcpython-783f49317394734c8e50e9e8c2aa34427e9e121e.zip
cpython-783f49317394734c8e50e9e8c2aa34427e9e121e.tar.gz
cpython-783f49317394734c8e50e9e8c2aa34427e9e121e.tar.bz2
DistutilsSetupError was not raised when one single warning occured
Diffstat (limited to 'Lib/distutils/tests/test_check.py')
-rw-r--r--Lib/distutils/tests/test_check.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/Lib/distutils/tests/test_check.py b/Lib/distutils/tests/test_check.py
index 5e0c453..372bae3 100644
--- a/Lib/distutils/tests/test_check.py
+++ b/Lib/distutils/tests/test_check.py
@@ -72,17 +72,16 @@ class CheckTestCase(support.LoggingSilencer,
self.assertEquals(cmd._warnings, 1)
# let's see if we have an error with strict=1
- cmd = check(dist)
- cmd.initialize_options()
- cmd.strict = 1
- cmd.ensure_finalized()
- self.assertRaises(DistutilsSetupError, cmd.run)
+ metadata = {'url': 'xxx', 'author': 'xxx',
+ 'author_email': 'xxx',
+ 'name': 'xxx', 'version': 'xxx',
+ 'long_description': broken_rest}
+ self.assertRaises(DistutilsSetupError, self._run, metadata,
+ **{'strict': 1, 'restructuredtext': 1})
# and non-broken rest
- rest = 'title\n=====\n\ntest'
- pkg_info, dist = self.create_dist(long_description=rest)
- cmd = check(dist)
- cmd.check_restructuredtext()
+ metadata['long_description'] = 'title\n=====\n\ntest'
+ cmd = self._run(metadata, strict=1, restructuredtext=1)
self.assertEquals(cmd._warnings, 0)
def test_check_all(self):