def __init__(self, test, conf, fs, build): self.env = {} for ctx in [fs, build]: if hasattr(ctx, 'env'): self.env.update(ctx.env) self.test = test self.conf = conf self.build = build self.msg = hlp.Message(conf) self.fs = fs
def __init__(self, test, conf, **kwargs): self.env = {} for ctx in [kwargs['fs'], kwargs['build']]: if hasattr(ctx, 'env'): self.env.update(ctx.env) self.test = test self.conf = conf self.build = kwargs['build'] self.fs = kwargs['fs'] self.valgrind = kwargs['valgrind'] self.msg = hlp.Message(conf)
def __init__(self, config): if self.__module__ == '__main__': self.cwd = path.dirname(path.abspath(sys.argv[0])) else: self.cwd = self.__module__ self.config = config self.msg = hlp.Message(config) self.group = path.basename(self.cwd) self.testdir = self.group + '_' + str(self.testnum) self.utenv = self._get_utenv() self.ctxs = self._get_contexts()
def _handle_read(self, data_): if not self.stream.closed(): data = data_.rstrip() message = helpers.Message(data) logger.debug('[{}][{}][{}]'.format(self.address, unicode(message), data)) if message.type == helpers.Message.MESSAGE and self.is_authed: self.last_message = message self._queue.put((100, self.sockets_broadcast('message', unicode(message)))) if not self.is_authed: if message.type == helpers.Message.AUTH: self.on_auth(message) else: if message.type == helpers.Message.END: self.on_close() self._read_line()
import automaton, pickle, pygame, math, pybutton, pyperclip import helpers as H pygame.init() font = pygame.font.SysFont("monospace", 30) graph_state = "DFA" clock = pygame.time.Clock() pygame.display.set_caption("Graphs v0.6") screen = pygame.display.set_mode(H.SCREEN_SIZE) change_button = pybutton.PygButton((50, 50, 100, 50), 'Change') message = H.Message() graph_display = H.Graph_Display() input_message = H.Input_Message() done = False drag = False selected = None input_text = "" last_clicks = [] def lose_selection(): global selected selected = None def line_exists(circle_a, circle_b, value): for circle in H.circles: for line in circle.lines: if graph_state == "DFA":