def setupQt(): mwGlob = { 'workDir': 'mw4/test', 'configDir': 'mw4/test/config', 'dataDir': 'mw4/test/data', 'tempDir': 'mw4/test/temp', 'imageDir': 'mw4/test/image', 'modelDir': 'mw4/test/model', } test = PyQt5.QtWidgets.QApplication(sys.argv) loader.extractDataFiles(mwGlob=mwGlob) app = mainApp.MountWizzard4(mwGlob=mwGlob) spy = PyQt5.QtTest.QSignalSpy(app.message) app.mount.stopTimers() app.measure.timerTask.stop() app.relay.timerTask.stop() return app, spy, mwGlob, test
def test_extractDataFiles_3(): mwGlob = dict() mwGlob['dataDir'] = 'mw4/test/data' with mock.patch.object(os.path, 'isfile', return_value=False): suc = loader.extractDataFiles(mwGlob=mwGlob) assert suc
def test_extractDataFiles_2(): mwGlob = dict() mwGlob['dataDir'] = 'mw4/test/data' suc = loader.extractDataFiles(mwGlob=mwGlob) assert suc
def test_extractDataFiles_1(): suc = loader.extractDataFiles() assert not suc
def test_extractDataFiles_3(): files = glob.glob(mwGlob['dataDir'] + '/*') for f in files: os.remove(f) suc = loader.extractDataFiles(mwGlob=mwGlob) assert suc
def test_extractDataFiles_2(): suc = loader.extractDataFiles(mwGlob=mwGlob) assert suc