Parcourir la source

add failing test

Dan Fellin il y a 10 ans
Parent
commit
ac55b5f434
1 fichiers modifiés avec 6 ajouts et 1 suppressions
  1. 6 1
      thumbnailer/test_thumbnails.py

+ 6 - 1
thumbnailer/test_thumbnails.py

@@ -1,7 +1,7 @@
 from thumbnailer import _resizer
 from unittest import TestCase, main
 import os.path as path
-from PIL import Image, ImageChops
+from PIL import Image
 
 class ThumbnailerTests(TestCase):
 
@@ -47,6 +47,11 @@ class ThumbnailerFilenameTest(TestCase):
         new_name = r.get_thumbnail_name(self.path('sample_image.jpg'))
         self.assertEqual('sample_image_square.jpg', new_name)
 
+    def testRootWithSlash(self):
+        r = _resizer('square', '100', self.img_path + '/')
+        new_name = r.get_thumbnail_name(self.path('sample_image.jpg'))
+        self.assertEqual('sample_image_square.jpg', new_name)
+
     def testSubdir(self):
         """Test a file that is in a sub-directory of img_path."""