~ubuntu-branches/ubuntu/trusty/python-distutils-extra/trusty-proposed

« back to all changes in this revision

Viewing changes to test/auto.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-02-11 10:39:50 UTC
  • mfrom: (18.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110211103950-kseoijf2ilwdr3rr
Tags: 2.24-1
* auto.py: Fix the string comparison to not install *.notifyrc.in files
  twice. Thanks Éric Araujo for spotting this!
* DistUtilsExtra/auto.py, __provides(): Do not accidentally clobber
  "py_modules" with "packages", by using a proper copy of the list. Remove
  error filter workaround from test/auto.py.
* Rename "check" command to "pylint", to avoid clobbering distutils' own
  check command in 2.7/3.x. (LP: #714655)
* DistUtilsExtra/auto.py, DistUtilsExtra/command/__init__.py: Actually
  expose the pylint command as a setup.py command.
* Remove pykdeuic4 integration, it's been a continuous source of build
  failures and bugs. Using uic.loadUi() is much more robust.
  Instead, install Qt *.ui files into /usr/share/projectname/ just like the
  GtkBuilder *.ui files.
* debian/compat, debian/control: Bump to dh 7 compatibility, as we are using
  dh_auto_* magic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
558
558
            self.failIf(f in manifest, '%s not in manifest' % f)
559
559
        os.unlink(os.path.join(self.src, 'MANIFEST'))
560
560
 
561
 
    def test_gtkbuilder(self):
562
 
        '''GtkBuilder *.ui'''
 
561
    def test_ui(self):
 
562
        '''GtkBuilder/Qt *.ui'''
563
563
 
564
564
        self._mksrc('gtk/test.ui', '''<?xml version="1.0"?>
565
565
<interface>
579
579
  </object>
580
580
</interface>''')
581
581
 
 
582
        self._mksrc('kde/mainwindow.ui', '''<?xml version="1.0"?>
 
583
<ui version="4.0">
 
584
 <class>CrashDialog</class>
 
585
 <widget class="QDialog" name="CrashDialog">
 
586
 </widget>
 
587
</ui>
 
588
''')
 
589
 
582
590
        self._mksrc('someweird.ui')
583
591
 
584
592
        (o, e, s) = self.do_install()
590
598
        f = self.installed_files()
591
599
        self.assert_('/usr/share/foo/test.ui' in f)
592
600
        self.assert_('/usr/share/foo/settings.ui' in f)
 
601
        self.assert_('/usr/share/foo/mainwindow.ui' in f)
593
602
        ftext = '\n'.join(f)
594
603
        self.failIf('someweird' in ftext)
595
604
 
773
782
        err = err.decode()
774
783
        os.chdir(oldcwd)
775
784
 
776
 
        # python3 distutils bug workaround, filter out bogus errors
777
 
        bogus_re = re.compile('^file .* \(for module .*\) not found$')
778
 
        err = '\n'.join([l for l in err.splitlines() if not bogus_re.match(l)])
779
 
        if err:
780
 
            err += '\n'
781
 
 
782
785
        return (out, err, s.returncode)
783
786
 
784
787
    def do_install(self):