Exemplo n.º 1
0
    def test_screenSize(self):
        guess_720p = guessit.guess_file_info("2012.2009.720p.BluRay.x264.DTS WiKi.mkv", 'autodetect')
        guess_1080p = guessit.guess_file_info("2012.2009.1080p.BluRay.x264.DTS WiKi.mkv", 'autodetect')

        best_quality_guess = quality.best_quality(guess_720p, guess_1080p)

        self.assertTrue(guess_1080p == best_quality_guess, "1080p release is not the best quality")
Exemplo n.º 2
0
    def test_quality_transformers(self):
        guess_720p = guessit.guess_file_info("2012.2009.720p.BluRay.x264.DTS WiKi.mkv")
        guess_1080p = guessit.guess_file_info("2012.2009.1080p.BluRay.x264.MP3 WiKi.mkv")

        assert 'audioCodec' in guess_720p, "audioCodec should be present"
        assert 'audioCodec' in guess_1080p, "audioCodec should be present"
        assert 'screenSize' in guess_720p, "screenSize should be present"
        assert 'screenSize' in guess_1080p, "screenSize should be present"

        best_quality_guess = best_quality(guess_720p, guess_1080p)

        assert guess_1080p == best_quality_guess, "1080p+MP3 is not the best global quality"

        best_quality_guess = best_quality_properties(['screenSize'], guess_720p, guess_1080p)

        assert guess_1080p == best_quality_guess, "1080p is not the best screenSize"

        best_quality_guess = best_quality_properties(['audioCodec'], guess_720p, guess_1080p)

        assert guess_720p == best_quality_guess, "DTS is not the best audioCodec"