def main_window(request): """Main Window fixture""" # Tests assume inline backend CONF.set('ipython_console', 'pylab/backend', 0) # Check if we need to use introspection in a given test # (it's faster and less memory consuming not to use it!) use_introspection = request.node.get_marker('use_introspection') if use_introspection: os.environ['SPY_TEST_USE_INTROSPECTION'] = 'True' else: try: os.environ.pop('SPY_TEST_USE_INTROSPECTION') except KeyError: pass # Start the window app = initialize() options, args = get_options() window = run_spyder(app, options, args) def close_window(): window.close() request.addfinalizer(close_window) return window
def main_window(request): app = initialize() options, args = get_options() widget = run_spyder(app, options, args) def close_widget(): widget.close() request.addfinalizer(close_widget) return widget
def main_window(request): """Main Window fixture""" # Check if we need to use introspection in a given test # (it's faster and less memory consuming not to use it!) marker = request.node.get_marker('use_introspection') if marker: os.environ['SPY_TEST_USE_INTROSPECTION'] = 'True' else: try: os.environ.pop('SPY_TEST_USE_INTROSPECTION') except KeyError: pass # Start the window app = initialize() options, args = get_options() window = run_spyder(app, options, args) def close_window(): window.close() request.addfinalizer(close_window) return window
def main_window(): app = initialize() options, args = get_options() widget = run_spyder(app, options, args) return widget