def runTest(self):
        # TODO - This is nasty re-write
        if len(self.guesser) == 0:
            tkMessageBox.showwarning('Underprepared for examination!',
                                     'Your guesser has had no training. Please train and retry.')
            return
        path = tkFileDialog.askdirectory()
        if not path:
            return
        answer = tkSimpleDialog.askstring('Which Pool do these items belong to?', 'Pool name?',
                                          parent=self.app)

        if not answer:
            return
        if answer not in self.guesser.pools:
            return
        
        de = DirectoryExam(path, answer, self.app.itemClass)
        testCount = len(de)
        scale = self.calcScale(testCount)
        x = 0
        y = 0
        cumTime = 0
        iGuess, iRight, iWrong, iAcc = self.model
        for m, ans in de:
            then = time.time()
            g = self.guesser.guess(m)
            cumTime += time.time() - then
            if g:
                g = g[0][0]
                iGuess.set(iGuess.get()+1)
                if g == ans:
                    col = 'green'
                    iRight.set(iRight.get()+1)
                else:
                    col = 'red'
                    iWrong.set(iWrong.get()+1)
                iAcc.set(round(100 * float(iGuess.get())/iRight.get(), 3))

            # Plot squares
            self.canvas.create_rectangle(x*scale,y*scale,(x+1)*scale,(y+1)*scale,fill=col)
            if not divmod(iGuess.get(),(int(self.size/scale)))[1]:
                # wrap
                x = 0
                y += 1
            else:
                x += 1
                
            self.update_idletasks()
        guesses = iGuess.get()
        self.app.status.log('%r guesses in %.2f seconds. Avg: %.2f/sec.' % (guesses, cumTime,
                                                                        round(guesses/cumTime, 2)))
dataset/ETHPy150Open mimecuvalo/helloworld/packages/reverend/ui/tester.py/TestView.runTest/swapped operands of `/`