From: Marcin Koziej Date: Mon, 21 May 2012 09:54:18 +0000 (+0200) Subject: listdir doesn't give sorted files of course. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/7f4607810640a9e562f06df4f1b8ec6fee8b0eea listdir doesn't give sorted files of course. --- 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',