|
@@ -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."""
|
|
|
|