Merge lp:~maxb/bzr-builddeb/testfix3 into lp:bzr-builddeb

Proposed by Max Bowsher
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 530
Merged at revision: 531
Proposed branch: lp:~maxb/bzr-builddeb/testfix3
Merge into: lp:bzr-builddeb
Prerequisite: lp:~maxb/bzr-builddeb/testfix2
Diff against target: 14 lines (+3/-1) (has conflicts)
1 file modified
tests/test_repack_tarball.py (+3/-1)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~maxb/bzr-builddeb/testfix3
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+51451@code.launchpad.net

Commit message

Make tests compatible with an oddity of the tarfile module in Python 2.5.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_repack_tarball.py'
2--- tests/test_repack_tarball.py 2009-05-06 16:57:26 +0000
3+++ tests/test_repack_tarball.py 2011-02-27 11:15:11 +0000
4@@ -94,7 +94,9 @@
5 repack_tarball(self.old_tarball, self.new_tarball)
6 tar = tarfile.open(self.new_tarball, 'r:gz')
7 try:
8- members = tar.getnames()
9+ # The tarfile module returns member names of directories with a
10+ # trailing slash, in Python 2.5 *only*.
11+ members = [x.rstrip("/") for x in tar.getnames()]
12 finally:
13 tar.close()
14 self.assertEqual(members,

Subscribers

People subscribed via source and target branches