From 7f4607810640a9e562f06df4f1b8ec6fee8b0eea Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Mon, 21 May 2012 11:54:18 +0200 Subject: [PATCH 1/1] listdir doesn't give sorted files of course. --- apps/catalogue/tests/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/catalogue/tests/__init__.py b/apps/catalogue/tests/__init__.py index ac9298cd..3421d333 100755 --- a/apps/catalogue/tests/__init__.py +++ b/apps/catalogue/tests/__init__.py @@ -136,6 +136,7 @@ class GalleryAppendTests(TestCase): self.book1.append(self.book2) files = listdir(join(self.scandir, self.book1.gallery)) + files.sort() self.assertEqual(files, [ '1-0001_1l', '1-0001_2r', @@ -169,6 +170,7 @@ class GalleryAppendTests(TestCase): self.book1.append(self.book2) files = listdir(join(self.scandir, self.book1.gallery)) + files.sort() print files self.assertEqual(files, [ '0-0001_1l', @@ -202,6 +204,7 @@ class GalleryAppendTests(TestCase): self.book1.append(self.book2) files = listdir(join(self.scandir, self.book1.gallery)) + files.sort() print files self.assertEqual(files, [ '0-1-0001_1l', -- 2.20.1