def test_getFlacPath(self): # microphone.FLAC_PATH = None # with pytest.raises(MicrophoneError): # _getFlacPath('this is not flac') microphone.FLAC_PATH = None _getFlacPath() microphone.FLAC_PATH = None _getFlacPath("flac") microphone.FLAC_PATH = "flac" assert microphone.FLAC_PATH
def test_getFlacPath(self): #microphone.FLAC_PATH = None #with pytest.raises(MicrophoneError): # _getFlacPath('this is not flac') microphone.FLAC_PATH = None _getFlacPath() microphone.FLAC_PATH = None _getFlacPath('flac') microphone.FLAC_PATH = 'flac' assert microphone.FLAC_PATH
def setup_class(self): try: assert _getFlacPath() except: pytest.skip() self.tmp = mkdtemp(prefix="psychopy-tests-microphone") for testFile in ["red_16000.flac.dist", "green_48000.flac.dist"]: t = join(TESTS_DATA_PATH, testFile) new_wav = join(self.tmp, testFile.replace(".dist", "")) shutil.copyfile(t, new_wav) flac2wav(new_wav)
def setup_class(self): try: assert _getFlacPath() except: pytest.skip() self.tmp = mkdtemp(prefix='psychopy-tests-microphone') for testFile in ['red_16000.flac.dist', 'green_48000.flac.dist']: t = join(TESTS_DATA_PATH, testFile) new_wav = join(self.tmp, testFile.replace('.dist', '')) shutil.copyfile(t, new_wav) flac2wav(new_wav)
def setup_class(self): try: assert _getFlacPath() except Exception: # some of the utils could be designed not to need flac but they # currently work on a file that is distributed in flac format pytest.skip() self.tmp = mkdtemp(prefix='psychopy-tests-microphone') for testFile in ['red_16000.flac.dist', 'green_48000.flac.dist']: t = join(TESTS_DATA_PATH, testFile) new_wav = join(self.tmp, testFile.replace('.dist', '')) shutil.copyfile(t, new_wav) microphone.flac2wav(new_wav)
def setup_class(self): try: assert _getFlacPath() except Exception: # some of the utils could be designed not to need flac but they # currently work on a file that is distributed in flac format pytest.skip() self.tmp = mkdtemp(prefix='psychopy-tests-microphone') for testFile in ['red_16000.flac.dist', 'green_48000.flac.dist']: t = join(TESTS_DATA_PATH, testFile) new_wav = join(self.tmp, testFile.replace('.dist', '')) shutil.copyfile(t, new_wav) flac2wav(new_wav)
def test_getFlacPath(self): microphone.FLAC_PATH = None with pytest.raises(microphone.MicrophoneError): _getFlacPath('this is not the flac you are looking for') microphone.FLAC_PATH = None _getFlacPath('flac') microphone.FLAC_PATH = 'flac' assert microphone.FLAC_PATH microphone.FLAC_PATH = None _getFlacPath()
def test_getFlacPath(self): microphone.FLAC_PATH = None with pytest.raises(MicrophoneError): _getFlacPath('this is not the flac you are looking for') microphone.FLAC_PATH = None _getFlacPath('flac') microphone.FLAC_PATH = 'flac' assert microphone.FLAC_PATH microphone.FLAC_PATH = None _getFlacPath()