コード例 #1
0
 def test_create_loader_archive_type_but_not_archive(self):
     for archive_format in [".cbt", ".cbr", "cbz"]:
         with self.subTest(archive_format=archive_format):
             with self.assertRaises(InvalidTypeFileException):
                 loader = ComicLoaderFactory.create_loader(
                     "test"+archive_format
                 )
コード例 #2
0
	def test_create_loader_archive_type_but_not_archive(self):
		for archive_format in [".cbt", ".cbr", "cbz"]:
			with self.subTest(archive_format=archive_format):
				with self.assertRaises(InvalidTypeFileException):
					loader = ComicLoaderFactory.create_loader(
						"test"+archive_format
					)
コード例 #3
0
 def test_create_loader_images(self):
     for image_format in IMAGE_FILE_FORMATS:
         with self.subTest(image_format=image_format):
             loader = ComicLoaderFactory.create_loader("test" +
                                                       image_format)
             self.assertTrue(isinstance(loader, ComicImageLoader))
コード例 #4
0
 def test_create_loader_tar(self):
     loader = ComicLoaderFactory.create_loader("test.tar")
     self.assertTrue(isinstance(loader, ComicTarLoader))
コード例 #5
0
 def test_create_loader_zip(self):
     loader = ComicLoaderFactory.create_loader("test.zip")
     self.assertTrue(isinstance(loader, ComicZipLoader))
コード例 #6
0
 def test_create_loader_invalid_type(self):
     with self.assertRaises(InvalidTypeFileException):
         ComicLoaderFactory.create_loader("test.sh")
コード例 #7
0
 def test_create_loader_images(self):
     for image_format in IMAGE_FILE_FORMATS:
         with self.subTest(image_format=image_format):
             loader = ComicLoaderFactory.create_loader("test"+image_format)
             self.assertTrue(isinstance(loader, ComicImageLoader))
コード例 #8
0
 def test_create_loader_tar(self):
     loader = ComicLoaderFactory.create_loader("test.tar")
     self.assertTrue(isinstance(loader, ComicTarLoader))
コード例 #9
0
 def test_create_loader_zip(self):
     loader = ComicLoaderFactory.create_loader("test.zip")
     self.assertTrue(isinstance(loader, ComicZipLoader))
コード例 #10
0
 def test_create_loader_invalid_type(self):
     with self.assertRaises(InvalidTypeFileException):
         ComicLoaderFactory.create_loader("test.sh")