Table of Contents

Class: UnittestDialog eric3/PyUnit/UnittestDialog.py

Class implementing the UI to the pyunit package.

Signals

unittestFile(string,int,int)
emitted to show the source of a unittest file
Base Classes   
UnittestForm
Methods   
__init__
colorizeProgressbar
handleErrorHighlighted
handleFileDialog
handleListboxDoubleClick
handleRunning
handleShowSource
handleStartTest
handleStopTest
handleStopped
handleTestErrored
handleTestFailed
handleTestFinished
handleTestStarted
handleUTPrepared
insertProg
  __init__ 
__init__ (
        self,
        prog=None,
        dbs=None,
        ui=None,
        parent=None,
        name=None,
        modal=0,
        fl=0,
        )

Constructor

Arguments

prog
filename of the program to open
dbs
reference to the debug server object. It is an indication whether we were called from within the eric3 IDE
ui
reference to the UI object
parent
parent widget of this dialog (QWidget)
name
name of this dialog (string or QString)
modal
flag indicating a modal dialog
fl
window flags
  colorizeProgressbar 
colorizeProgressbar ( self,  color )

Private methode to set the color of the progressbar.

Arguments

color
colour for the progressbar
  handleErrorHighlighted 
handleErrorHighlighted ( self,  text )

Private slot to handle the highlighted(const QString&) signal.

  handleFileDialog 
handleFileDialog ( self )

Private slot to open a file dialog.

  handleListboxDoubleClick 
handleListboxDoubleClick ( self,  lbitem )

Private slot called by doubleclicking an errorlist entry.

It will popup a dialog showing the stacktrace. If called from eric, an additional button is displayed to show the python source in an eric source viewer (in erics main window.

Arguments

lbitem
the listbox item that was double clicked
  handleRunning 
handleRunning ( self )

Private method to set the GUI in running mode.

  handleShowSource 
handleShowSource ( self )

Private slot to show the source of a traceback in an eric3 editor.

  handleStartTest 
handleStartTest ( self )

Private slot to start the test.

  handleStopTest 
handleStopTest ( self )

Private slot to stop the test.

  handleStopped 
handleStopped ( self )

Private method to set the GUI in stopped mode.

  handleTestErrored 
handleTestErrored (
        self,
        test,
        exc,
        )

Public method called if a test errors.

Arguments

test
name of the failed test (string)
exc
string representation of the exception (list of strings)
  handleTestFailed 
handleTestFailed (
        self,
        test,
        exc,
        )

Public method called if a test fails.

Arguments

test
name of the failed test (string)
exc
string representation of the exception (list of strings)
  handleTestFinished 
handleTestFinished ( self )

Public method called if a test has finished.

Note: It is also called if it has already failed or errored.

  handleTestStarted 
handleTestStarted (
        self,
        test,
        doc,
        )

Public method called if a test is about to be run.

Arguments

test
name of the started test (string)
doc
documentation of the started test (string)
  handleUTPrepared 
handleUTPrepared (
        self,
        nrTests,
        exc_type,
        exc_value,
        )

Private slot to handle the utPrepared signal.

If the unittest suite was loaded successfully, we ask the client to run the test suite.

Arguments

nrTests
number of tests contained in the test suite (integer)
exc_type
type of exception occured during preparation (string)
exc_value
value of exception occured during preparation (string)
  insertProg 
insertProg ( self,  prog )

Public slot to insert the filename prog into the testsuiteComboBox object.


Table of Contents

This document was automatically generated by HappyDoc version 2.1