def setUp(self): """Call before every test case.""" try: config.add_section('Shop') except: pass try: config.add_section('Services') config.add_section('Activities') except: pass config.set('Shop', 'voucher_percentage', '33.3334') config.set('Shop', 'fee_percentage', '1') config.set('Shop', 'name', 'enviclean') config.set('Services', 'services', '') config.set('Activities', 'start', 'test_kernel') config.set('Activities', 'package', 'red.tests') self.kernel = Kernel(None)
""" The layoutrunner can be used to run a layout and see it without running the kernel """ from red.mainwindow import MainWindow from red.services.display import Display from PySide import QtGui import zmq , threading, sys from red.config import config config.add_section("GUI") config.set("GUI","cursor", 'true') app = QtGui.QApplication(sys.argv) socketName = "inproc://display" class InThreasd(threading.Thread): def __init__(self): super(InThreasd,self).__init__() context = zmq.Context() real_context = zmq.Context.instance(); self.socket = real_context.socket(zmq.PAIR) self.socket.bind(socketName) self.last = ""