def module_setup_teardown(): global app, spy, mwGlob, test app, spy, mwGlob, test = setupQt() file = mwGlob['imageDir'] + '/test.fit' if os.path.isfile(file): os.remove(file) yield
def module_setup_teardown(): global app, spy, mwGlob, test app, spy, mwGlob, test = setupQt() app.config['showImageWindow'] = True app.toggleWindow(windowTag='showImageW') yield file = mwGlob['imageDir'] + '/test.fit' if os.path.isfile(file): os.remove(file)
def module_setup_teardown(): global app, spy, mwGlob, test app, spy, mwGlob, test = setupQt() app.mainW.lastGenerator = 'test' yield files = glob.glob(mwGlob['modelDir'] + '/m-*.model') for f in files: os.remove(f) for path in glob.glob(mwGlob['imageDir'] + '/m-*'): shutil.rmtree(path)
def module_setup_teardown(): global app, spy, mwGlob, test app, spy, mwGlob, test = setupQt() value = np.datetime64('2014-12-12 20:20:20') app.measure.devices['sensorWeather'] = '' app.measure.devices['power'] = '' app.measure.devices['skymeter'] = '' app.measure.data = { 'time': np.empty(shape=[0, 1], dtype='datetime64'), 'sensorWeatherTemp': np.full([5, 1], 1.0), 'sensorWeatherHum': np.full([5, 1], 1.0), 'sensorWeatherPress': np.full([5, 1], 1.0), 'sensorWeatherDew': np.full([5, 1], 1.0), 'skySQR': np.full([5, 1], 1.0), 'skyTemp': np.full([5, 1], 1.0), 'raJNow': np.full([5, 1], 1.0), 'decJNow': np.full([5, 1], 1.0), 'status': np.full([5, 1], 1.0), 'powCurr1': np.full([5, 1], 1.0), 'powCurr2': np.full([5, 1], 1.0), 'powCurr3': np.full([5, 1], 1.0), 'powCurr4': np.full([5, 1], 1.0), 'powVolt': np.full([5, 1], 1.0), 'powCurr': np.full([5, 1], 1.0), 'powHum': np.full([5, 1], 1.0), 'powTemp': np.full([5, 1], 1.0), 'powDew': np.full([5, 1], 1.0), } app.measure.data['time'] = np.append(app.measure.data['time'], value) app.measure.data['time'] = np.append(app.measure.data['time'], value) app.measure.data['time'] = np.append(app.measure.data['time'], value) app.measure.data['time'] = np.append(app.measure.data['time'], value) app.measure.data['time'] = np.append(app.measure.data['time'], value) app.config['showMeasureW'] = True app.toggleWindow(windowTag='showMeasureW') yield
def module_setup_teardown(): global app, spy, mwGlob, test, host app, spy, mwGlob, test = setupQt() host_ip = '192.168.2.250' host = (host_ip, 80)
def module_setup_teardown(): global app, spy, mwGlob, test app, spy, mwGlob, test = setupQt() yield
def module_setup_teardown(): global app, spy, mwGlob, test app, spy, mwGlob, test = setupQt() app.config['showHemisphereW'] = True app.toggleWindow(windowTag='showHemisphereW')
def module_setup_teardown(): global app, spy, mwGlob, test with mock.patch.object(platform, 'system', return_value='None'): app, spy, mwGlob, test = setupQt()
# Licence APL2.0 # ########################################################### # standard libraries import pytest import os import json import binascii import unittest.mock as mock # external packages import skyfield.api # local import from mw4.modeldata import buildpoints from mw4.test.test_units.setupQt import setupQt app, spy, mwGlob, test = setupQt() @pytest.fixture(autouse=True, scope='function') def module_setup_teardown(): global data config = mwGlob['configDir'] testdir = os.listdir(config) for item in testdir: if item.endswith('.bpts'): os.remove(os.path.join(config, item)) if item.endswith('.hpts'): os.remove(os.path.join(config, item)) data = buildpoints.DataPoint( mwGlob=mwGlob,
def module_setup_teardown(): global app, spy, mwGlob, test app, spy, mwGlob, test = setupQt() app.config['showMessageWindow'] = True app.toggleWindow(windowTag='showMessageW') yield
def module_setup_teardown(): global app, spy, mwGlob, test app, spy, mwGlob, test = setupQt() app.mainW.deviceStat['mount'] = True yield
def module_setup_teardown(): global app, spy, mwGlob, test app, spy, mwGlob, test = setupQt() yield import shutil shutil.rmtree(mwGlob['imageDir'] + 'm-file*', ignore_errors=True)
def module_setup_teardown(): global app, spy, mwGlob, test, testGlob, workDir app, spy, mwGlob, test = setupQt() testGlob = copy.copy(mwGlob) workDir = os.getcwd()