Ver código fonte

Modify module import syntax to avoid confusion with test method

Modify module import syntax to avoid confusion with test method

Remove .swp file

Squash commits
gavinzbq 7 anos atrás
pai
commit
c8af134a08
1 arquivos alterados com 5 adições e 5 exclusões
  1. 5 5
      thumbnailer/test_thumbnails.py

+ 5 - 5
thumbnailer/test_thumbnails.py

@@ -1,15 +1,15 @@
 from thumbnailer import _resizer
 from thumbnailer import _resizer
 from unittest import TestCase, main
 from unittest import TestCase, main
-import os.path as path
+import os
 from PIL import Image
 from PIL import Image
 
 
 class ThumbnailerTests(TestCase):
 class ThumbnailerTests(TestCase):
 
 
     def path(self, filename):
     def path(self, filename):
-        return path.join(self.img_path, filename)
+        return os.path.join(self.img_path, filename)
 
 
     def setUp(self):
     def setUp(self):
-        self.img_path = path.join(path.dirname(__file__), "test_data")
+        self.img_path = os.path.join(os.path.dirname(__file__), "test_data")
         self.img = Image.open(self.path("sample_image.jpg"))
         self.img = Image.open(self.path("sample_image.jpg"))
 
 
     def testSquare(self):
     def testSquare(self):
@@ -35,10 +35,10 @@ class ThumbnailerTests(TestCase):
 class ThumbnailerFilenameTest(TestCase):
 class ThumbnailerFilenameTest(TestCase):
 
 
     def path(self, *parts):
     def path(self, *parts):
-        return path.join(self.img_path, *parts)
+        return os.path.join(self.img_path, *parts)
 
 
     def setUp(self):
     def setUp(self):
-        self.img_path = path.join(path.dirname(__file__), "test_data")
+        self.img_path = os.path.join(os.path.dirname(__file__), "test_data")
 
 
     def testRoot(self):
     def testRoot(self):
         """Test a file that is in the root of img_path."""
         """Test a file that is in the root of img_path."""