Merge lp:~mvo/gdebi/test-fixes into lp:gdebi

Proposed by Michael Vogt
Status: Merged
Merged at revision: 463
Proposed branch: lp:~mvo/gdebi/test-fixes
Merge into: lp:gdebi
Diff against target: 102 lines (+17/-11)
5 files modified
GDebi/GDebiCommon.py (+7/-6)
GDebi/GDebiKDE.py (+1/-1)
debian/control (+2/-1)
debian/rules (+3/-1)
tests/test_gdebi_gtk_lintian.py (+4/-2)
To merge this branch: bzr merge lp:~mvo/gdebi/test-fixes
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Pending
gdebi-developers Pending
Review via email: mp+208922@code.launchpad.net

Description of the change

This branch fixes a testfailure during build and uses "python setup.py test" to run the tests.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Hm, in sbuild I get a test error:
======================================================================
ERROR: test_lintian (tests.test_gdebi_gtk_lintian.GDebiGtkTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
    return func(*args, **keywargs)
  File "/«PKGBUILDDIR»/tests/test_gdebi_gtk_lintian.py", line 51, in test_lintian
    if gdebi._lintian_exit_status is not None:
AttributeError: 'GDebiGtk' object has no attribute '_lintian_exit_status'

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'GDebi/GDebiCommon.py'
--- GDebi/GDebiCommon.py 2014-02-28 22:11:44 +0000
+++ GDebi/GDebiCommon.py 2014-03-01 08:24:22 +0000
@@ -36,7 +36,13 @@
36)36)
3737
3838
39if sys.version_info[0] == 2:39if sys.version_info[0] == 3:
40 from gettext import gettext as _
41 def py3utf8(s):
42 return s
43 utf8 = py3utf8
44 unicode = str
45else:
40 def _(str):46 def _(str):
41 return utf8(gettext.gettext(str))47 return utf8(gettext.gettext(str))
4248
@@ -50,11 +56,6 @@
50 # assume latin1 as fallback56 # assume latin1 as fallback
51 return unicode(str, 'latin1')57 return unicode(str, 'latin1')
52 utf8 = py2utf858 utf8 = py2utf8
53else:
54 from gettext import gettext as _
55 def py3utf8(s):
56 return s
57 utf8 = py3utf8
5859
59 60
60class GDebiCommon(object):61class GDebiCommon(object):
6162
=== modified file 'GDebi/GDebiKDE.py'
--- GDebi/GDebiKDE.py 2014-01-02 13:43:12 +0000
+++ GDebi/GDebiKDE.py 2014-03-01 08:24:22 +0000
@@ -65,7 +65,7 @@
6565
6666
67def __(catalog,str):67def __(catalog,str):
68 return unicode(gettext.dgettext(catalog, str), 'UTF-8')68 return utf8(gettext.dgettext(catalog, str))
6969
70def loadUi(file, parent):70def loadUi(file, parent):
71 """load local file if possible else use installed file"""71 """load local file if possible else use installed file"""
7272
=== modified file 'debian/control'
--- debian/control 2014-01-02 13:35:07 +0000
+++ debian/control 2014-03-01 08:24:22 +0000
@@ -15,7 +15,8 @@
15 python-setuptools,15 python-setuptools,
16 intltool,16 intltool,
17 xvfb,17 xvfb,
18 xauth18 xauth,
19 pyflakes
19X-Python-Version: >= 2.620X-Python-Version: >= 2.6
20Standards-Version: 3.9.521Standards-Version: 3.9.5
21Vcs-Bzr: https://code.launchpad.net/~gdebi-developers/gdebi/trunk22Vcs-Bzr: https://code.launchpad.net/~gdebi-developers/gdebi/trunk
2223
=== modified file 'debian/rules'
--- debian/rules 2014-02-28 22:12:29 +0000
+++ debian/rules 2014-03-01 08:24:22 +0000
@@ -1,5 +1,7 @@
1#!/usr/bin/make -f1#!/usr/bin/make -f
22
3PYTHON=python2
4
3%:5%:
4 dh $@ --with python26 dh $@ --with python2
57
@@ -8,7 +10,7 @@
8 rm -rf build GDebi/Version.py po/mo10 rm -rf build GDebi/Version.py po/mo
911
10override_dh_auto_test:12override_dh_auto_test:
11 xvfb-run -a nosetests13 xvfb-run -a $(PYTHON) setup.py test
1214
13override_dh_auto_install:15override_dh_auto_install:
14 dh_auto_install -- --install-scripts=/usr/share/gdebi \16 dh_auto_install -- --install-scripts=/usr/share/gdebi \
1517
=== modified file 'tests/test_gdebi_gtk_lintian.py'
--- tests/test_gdebi_gtk_lintian.py 2012-11-30 19:39:34 +0000
+++ tests/test_gdebi_gtk_lintian.py 2014-03-01 08:24:22 +0000
@@ -10,7 +10,8 @@
10from GDebi.GDebiGtk import GDebiGtk10from GDebi.GDebiGtk import GDebiGtk
11from GDebi.GDebiCommon import GDebiCommon11from GDebi.GDebiCommon import GDebiCommon
1212
13EXPECTED_LINTIAN_OUTPUT = """E: error-package: file-in-etc-not-marked-as-conffile etc/foo13EXPECTED_LINTIAN_OUTPUT = """E: error-package: changelog-file-missing-in-native-package
14E: error-package: file-in-etc-not-marked-as-conffile etc/foo
14E: error-package: control-file-has-bad-owner postinst egon/egon != root/root15E: error-package: control-file-has-bad-owner postinst egon/egon != root/root
15E: error-package: no-copyright-file16E: error-package: no-copyright-file
16E: error-package: package-has-no-description17E: error-package: package-has-no-description
@@ -56,7 +57,8 @@
56 start = buf.get_start_iter()57 start = buf.get_start_iter()
57 end = buf.get_end_iter()58 end = buf.get_end_iter()
58 lintian_output = buf.get_text(start, end, False)59 lintian_output = buf.get_text(start, end, False)
59 self.assertEqual(lintian_output.strip(), EXPECTED_LINTIAN_OUTPUT)60 self.maxDiff = None
61 self.assertMultiLineEqual(lintian_output.strip(), EXPECTED_LINTIAN_OUTPUT)
6062
6163
62if __name__ == "__main__":64if __name__ == "__main__":

Subscribers

People subscribed via source and target branches

to status/vote changes: