~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/distutils/tests/test_dist.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
import sys
10
10
import unittest
11
11
import warnings
 
12
import textwrap
12
13
 
13
14
from test.test_support import TESTFN
14
15
 
283
284
                os.environ[key] = value
284
285
            os.remove(user_filename)
285
286
 
 
287
    def test_long_description(self):
 
288
        long_desc = textwrap.dedent("""\
 
289
        example::
 
290
              We start here
 
291
            and continue here
 
292
          and end here.""")
 
293
        attrs = {"name": "package",
 
294
                 "version": "1.0",
 
295
                 "long_description": long_desc}
 
296
 
 
297
        dist = distutils.dist.Distribution(attrs)
 
298
        meta = self.format_metadata(dist)
 
299
        meta = meta.replace('\n' + 8 * ' ', '\n')
 
300
        self.assertTrue(long_desc in meta)
 
301
 
286
302
def test_suite():
287
303
    suite = unittest.TestSuite()
288
304
    suite.addTest(unittest.makeSuite(DistributionTestCase))