def showSelectedError(self):
        selection = self.errorListbox.curselection()
        if not selection: return
        selected = int(selection[0])
        txt = self.errorListbox.get(selected)
        window = tk.Toplevel(self.root)
        window.title(txt)
        window.protocol('WM_DELETE_WINDOW', window.quit)
        if len(self.errorInfo) < selected:
            test, error = self.errorInfo[selected]
            tk.Label(window, text=str(test),
                             foreground=(error is None) and "darkgreen" or "red", 
                             justify=tk.LEFT).pack(anchor=tk.W)
            if error is None:
                tk.Label(window, text='Test succeeded!', justify=tk.LEFT).pack()
            else:
                tracebackLines = apply(traceback.format_exception, error + (10,))
                tracebackText = string.join(tracebackLines,'')
                tk.Label(window, text=tracebackText, justify=tk.LEFT).pack()
        else:
            tk.Label(window, text='Test has not been executed!', justify=tk.LEFT).pack()
        tk.Button(window, text="Close",
                  command=window.quit).pack(side=tk.BOTTOM)
        window.bind('<Key-Return>', lambda e, w=window: w.quit())
        window.mainloop()
        window.destroy()
dataset/ETHPy150Open radekstepan/FlaskBudget/tests_gui.py/EnhancedGUIRunner.showSelectedError/swapped operands of `<`