コード例 #1
0
    def test_target_mp3_exists_flac_is_not_transcoded_again(self):
        with TemporaryDirectory() as tmp:
            with CountingTranscodeCalls() as transcode:
                flac_file, mp3_file = self.init_files(tmp)

                flac2mp3.process_transcoding((flac_file, tmp, tmp))
                flac2mp3.process_transcoding((flac_file, tmp, tmp))

                assert_equals(1, transcode.count())
コード例 #2
0
    def test_target_mp3_exists_flac_is_not_transcoded_again(self):
        with TemporaryDirectory() as tmp:
            with CountingTranscodeCalls() as transcode:
                flac_file, mp3_file = self.init_files(tmp)

                flac2mp3.process_transcoding((flac_file, tmp, tmp))
                flac2mp3.process_transcoding((flac_file, tmp, tmp))

                assert_equals(1, transcode.count())
コード例 #3
0
    def test_target_mp3_exists_with_differents_tags_flac_is_transcoded_again(self):
        with TemporaryDirectory() as tmp:
            with CountingTranscodeCalls() as transcode:
                flac_file, mp3_file = self.init_files(tmp)

                flac2mp3.process_transcoding((flac_file, tmp, tmp))

                self.create_flac_file(flac_file, tags={'ARTIST': u'artist'})
                flac2mp3.process_transcoding((flac_file, tmp, tmp))

                assert_equals(2, transcode.count())
コード例 #4
0
    def test_target_mp3_exists_with_differents_tags_flac_is_transcoded_again(
            self):
        with TemporaryDirectory() as tmp:
            with CountingTranscodeCalls() as transcode:
                flac_file, mp3_file = self.init_files(tmp)

                flac2mp3.process_transcoding((flac_file, tmp, tmp))

                self.create_flac_file(flac_file, tags={'ARTIST': u'artist'})
                flac2mp3.process_transcoding((flac_file, tmp, tmp))

                assert_equals(2, transcode.count())