Issue #17041: Fix testing when Python is configured with the

--without-doc-strings.
This commit is contained in:
Serhiy Storchaka 2013-01-27 20:03:39 +02:00
commit 26f1166510
6 changed files with 53 additions and 28 deletions

View file

@ -73,8 +73,9 @@ class BuildExtTestCase(TempdirManager,
self.assertEqual(xx.foo(2, 5), 7)
self.assertEqual(xx.foo(13,15), 28)
self.assertEqual(xx.new().demo(), None)
doc = 'This is a template module just for instruction.'
self.assertEqual(xx.__doc__, doc)
if support.HAVE_DOCSTRINGS:
doc = 'This is a template module just for instruction.'
self.assertEqual(xx.__doc__, doc)
self.assertTrue(isinstance(xx.Null(), xx.Null))
self.assertTrue(isinstance(xx.Str(), xx.Str))