tags 587137 + patch
thanks

On Fri, Jun 25, 2010 at 01:24:46PM +0100, James Westby wrote:
> My patch to the list a couple of weeks ago was intended to address these
> issues.

Posting your patch to the bug log.

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
z...@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime
--- Begin Message ---
python2.6 changed how the tarfile module outputs paths, which
broke the debfile tests. We use os.path.norpath to hide the difference
and get consistent behaviour across versions.
---
 tests/test_debfile.py |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/test_debfile.py b/tests/test_debfile.py
index 2287521..1de4777 100755
--- a/tests/test_debfile.py
+++ b/tests/test_debfile.py
@@ -136,18 +136,17 @@ class TestDebFile(unittest.TestCase):
         bz2_deb = debfile.DebFile(self.bz2_debname)
         # random test on the data part (which is bzipped), just to check if we
         # can access its content
-        self.assertEqual(bz2_deb.data.tgz().getnames()[10],
+        self.assertEqual(os.path.normpath(bz2_deb.data.tgz().getnames()[10]),
                 './usr/share/locale/bg/')
 
     def test_data_names(self):
         """ test for file list equality """ 
-        strip_dot_slash = lambda s: re.sub(r'^\./', '', s)
         tgz = self.d.data.tgz()
-        dpkg_names = map(strip_dot_slash,
+        dpkg_names = map(os.path.normpath,
                 [ x.strip() for x in
                     os.popen("dpkg-deb --fsys-tarfile %s | tar t" %
                         self.debname).readlines() ])
-        debfile_names = map(strip_dot_slash, tgz.getnames())
+        debfile_names = map(os.path.normpath, tgz.getnames())
         
         # skip the root
         self.assertEqual(debfile_names[1:], dpkg_names[1:])
-- 
1.7.0.4


--
http://lists.alioth.debian.org/mailman/listinfo/pkg-python-debian-discuss


--- End Message ---

Attachment: signature.asc
Description: Digital signature

Reply via email to