Example #1
0
class MPEGFileHandlingTests(unittest.TestCase):
    def setUp(self):
        if os.path.exists("data/temp.mp3"):
            os.unlink("data/temp.mp3")

    def test_handles(self):
        """File handles"""
        shutil.copy("data/song.mp3", "data/temp.mp3")
        self.mpeg = MPEGAudio('data/temp.mp3')
        duration = self.mpeg.duration
        self.mpeg.close()
        os.unlink("data/temp.mp3")
Example #2
0
class MPEGFileHandlingTests(unittest.TestCase):
    def setUp(self):
        if os.path.exists("data/temp.mp3"):
            os.unlink("data/temp.mp3")

    def test_handles(self):
        """File handles"""
        shutil.copy("data/song.mp3", "data/temp.mp3")
        self.mpeg = MPEGAudio('data/temp.mp3')
        duration = self.mpeg.duration
        self.mpeg.close()
        os.unlink("data/temp.mp3")