~ubuntu-branches/ubuntu/natty/python-distutils-extra/natty-security

« back to all changes in this revision

Viewing changes to test/auto.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-03-24 09:46:16 UTC
  • Revision ID: james.westby@ubuntu.com-20100324094616-mwzxuopdzyawoaf5
Tags: 2.18
* python-mkdebian: Switch stdout to line buffering, for scripts reading our
  output on the fly.
* auto.py: Ignore debian/ to avoid a lot of useless "does not recognize
  file" warnings. (LP: #519927)
* Bump Standards-Version to 3.8.4 (no changes necessary).
* test/auto.py: Use python-xdg instead of python-crypto for the "automatic
  requires" test, since -crypto uses obsolete libraries (sha in Python 2.6)
  which cause extra warnings. (Closes: #571506)

Show diffs side-by-side

added added

removed removed

Lines of Context:
611
611
        '''automatic requires/provides'''
612
612
 
613
613
        try:
614
 
            __import__('Crypto')
 
614
            __import__('xdg')
615
615
            __import__('dateutil')
616
616
        except ImportError:
617
 
            self.fail('You need to have Crypto and dateutil installed for this test suite to work')
 
617
            self.fail('You need to have xdg and dateutil installed for this test suite to work')
618
618
 
619
619
        self._mksrc('foo/__init__.py', '')
620
620
        self._mksrc('foo/stuff.py', '''import xml.parsers.expat
621
621
import os, os.path, email.mime, distutils.command.register
622
622
from email import header as h
623
 
import Crypto.PublicKey.DSA, unknown
 
623
import xdg.Mime, unknown
624
624
''')
625
625
 
626
626
        self._mksrc('foo/bar/__init__.py', '')
632
632
import sys
633
633
from dateutil import tz
634
634
import foo.bar
635
 
from Crypto import Cipher
 
635
from xdg import Menu
636
636
 
637
637
print 'import iamnota.module'
638
638
''', executable=True)
667
667
 
668
668
        # check requires
669
669
        req = [prop.split(' ', 1)[1] for prop in egg if prop.startswith('Requires: ')]
670
 
        self.assertEqual(set(req), set(['DistUtilsExtra.auto', 'Crypto', 'dateutil']))
 
670
        self.assertEqual(set(req), set(['DistUtilsExtra.auto', 'xdg', 'dateutil']))
671
671
 
672
672
    def test_help(self):
673
673
        '''Docbook XML help'''