def test_constructor_dd(self): files = ["01. Первое знакомство.avi", "02. Тяжелое расставание.avi"] constructor = Constructor(files) self.assertEqual(constructor.construct(1), "01. Первое знакомство.avi") self.assertEqual(constructor.construct(2), "02. Тяжелое расставание.avi") files = ["01. Бюро общественной безопасности, 9-й отдел.mkv", "02. Испытание.mkv", "03. Андроид и я.mkv", "04. Перехватчик.mkv", "05. Приманка.mkv", "06. Подражатели.mkv", "07. Идолопоклонничество.mkv", "08. Пропавшие сердца.mkv", "09. Чат! Чат! Чат!.mkv", "10. Война в джунглях.mkv", "11. Портреты.mkv", "12. Побег.mkv", "13. Неравенство.mkv"] constructor = Constructor(files) self.assertEqual(constructor.construct(5), files[4]) self.assertEqual(constructor.construct(6), files[5]) self.assertEqual(constructor.construct(7), files[6])
def test_sNeNN(self): files = [ "s5e01_The Wedding", "s5e02_Six Forgotten Warriors", "s5e03_Unclaimed Legacy"] constructor = Constructor(files) self.assertEqual( constructor.construct(1), files[0]) self.assertEqual( constructor.construct(3), files[2])
def test_constructor_diff_normal(self): constructor = Constructor(self.files_diff_normal) (pos, length) = constructor._find_diff(self.files_diff_normal[0], self.files_diff_normal[1]) self.assertEqual(pos, 17) self.assertEqual(length, 2) self.assertEqual(constructor.construct(6), self.files_diff_normal[5]) files = ["Dantalian no Shoka - 01 (TX 1280x720 x264).mp4", "Dantalian no Shoka - 02 (TX 1280x720 x264).mp4"] constructor = Constructor(files) self.assertEqual(constructor.construct(2), files[1])
def test_different_raws(self): files = ["[Commie] Haikyuu!! - 01 [5CB6E137].mkv", "[Commie] Haikyuu!! - 02 [87E40A94].mkv", "[Commie] Haikyuu!! - 03 [80B4441C].mkv", "[Commie] Haikyuu!! - 04 [9E537287].mkv", "[Commie] Haikyuu!! - 05 [009570F4].mkv", "[Commie] Haikyuu!! - 06 [AAE4F869].mkv", "[Commie] Haikyuu!! - 07 [572852D7].mkv", "[Commie] Haikyuu!! - 08 [13E5217D].mkv", "[mohbaboo-subs] Haikyuu!! - 09 [1B080828].mkv", "[mohbaboo-subs] Haikyuu!! - 10 [7FF0CBA2].mkv"] constructor = Constructor(files) self.assertEqual( constructor.construct(1), files[0]) self.assertEqual( constructor.construct(8), files[7])