--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Documentation/Source/eric5.PyUnit.UnittestDialog.html Sat Jan 02 18:19:35 2010 +0000 @@ -0,0 +1,457 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' +'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<html><head> +<title>eric5.PyUnit.UnittestDialog</title> +<style> +b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>eric5.PyUnit.UnittestDialog</h1> +<p> +Module implementing the UI to the pyunit package. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#QtTestResult">QtTestResult</a></td> +<td>A TestResult derivative to work with a graphical GUI.</td> +</tr><tr> +<td><a href="#UnittestDialog">UnittestDialog</a></td> +<td>Class implementing the UI to the pyunit package.</td> +</tr><tr> +<td><a href="#UnittestWindow">UnittestWindow</a></td> +<td>Main window class for the standalone dialog.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="QtTestResult" ID="QtTestResult"></a> +<h2>QtTestResult</h2> +<p> + A TestResult derivative to work with a graphical GUI. +</p><p> + For more details see pyunit.py of the standard python distribution. +</p> +<h3>Derived from</h3> +unittest.TestResult +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#QtTestResult.__init__">QtTestResult</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#QtTestResult.addError">addError</a></td> +<td>Method called if a test errored.</td> +</tr><tr> +<td><a href="#QtTestResult.addFailure">addFailure</a></td> +<td>Method called if a test failed.</td> +</tr><tr> +<td><a href="#QtTestResult.startTest">startTest</a></td> +<td>Method called at the start of a test.</td> +</tr><tr> +<td><a href="#QtTestResult.stopTest">stopTest</a></td> +<td>Method called at the end of a test.</td> +</tr> +</table> +<a NAME="QtTestResult.__init__" ID="QtTestResult.__init__"></a> +<h4>QtTestResult (Constructor)</h4> +<b>QtTestResult</b>(<i>parent</i>) +<p> + Constructor +</p><dl> +<dt><i>parent</i></dt> +<dd> +The parent widget. +</dd> +</dl><a NAME="QtTestResult.addError" ID="QtTestResult.addError"></a> +<h4>QtTestResult.addError</h4> +<b>addError</b>(<i>test, err</i>) +<p> + Method called if a test errored. +</p><dl> +<dt><i>test</i></dt> +<dd> +Reference to the test object +</dd><dt><i>err</i></dt> +<dd> +The error traceback +</dd> +</dl><a NAME="QtTestResult.addFailure" ID="QtTestResult.addFailure"></a> +<h4>QtTestResult.addFailure</h4> +<b>addFailure</b>(<i>test, err</i>) +<p> + Method called if a test failed. +</p><dl> +<dt><i>test</i></dt> +<dd> +Reference to the test object +</dd><dt><i>err</i></dt> +<dd> +The error traceback +</dd> +</dl><a NAME="QtTestResult.startTest" ID="QtTestResult.startTest"></a> +<h4>QtTestResult.startTest</h4> +<b>startTest</b>(<i>test</i>) +<p> + Method called at the start of a test. +</p><dl> +<dt><i>test</i></dt> +<dd> +Reference to the test object +</dd> +</dl><a NAME="QtTestResult.stopTest" ID="QtTestResult.stopTest"></a> +<h4>QtTestResult.stopTest</h4> +<b>stopTest</b>(<i>test</i>) +<p> + Method called at the end of a test. +</p><dl> +<dt><i>test</i></dt> +<dd> +Reference to the test object +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="UnittestDialog" ID="UnittestDialog"></a> +<h2>UnittestDialog</h2> +<p> + Class implementing the UI to the pyunit package. +</p><h4>Signals</h4> +<dl> +<dt>unittestFile(string,int,int)</dt> +<dd> +emitted to show the source of a unittest file +</dd> +</dl> +<h3>Derived from</h3> +QWidget, Ui_UnittestDialog +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#UnittestDialog.__init__">UnittestDialog</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#UnittestDialog.__UTPrepared">__UTPrepared</a></td> +<td>Private slot to handle the utPrepared signal.</td> +</tr><tr> +<td><a href="#UnittestDialog.__setProgressColor">__setProgressColor</a></td> +<td>Private methode to set the color of the progress color label.</td> +</tr><tr> +<td><a href="#UnittestDialog.__setRunningMode">__setRunningMode</a></td> +<td>Private method to set the GUI in running mode.</td> +</tr><tr> +<td><a href="#UnittestDialog.__setStoppedMode">__setStoppedMode</a></td> +<td>Private method to set the GUI in stopped mode.</td> +</tr><tr> +<td><a href="#UnittestDialog.__showSource">__showSource</a></td> +<td>Private slot to show the source of a traceback in an eric5 editor.</td> +</tr><tr> +<td><a href="#UnittestDialog.insertProg">insertProg</a></td> +<td>Public slot to insert the filename prog into the testsuiteComboBox object.</td> +</tr><tr> +<td><a href="#UnittestDialog.insertTestName">insertTestName</a></td> +<td>Public slot to insert a test name into the testComboBox object.</td> +</tr><tr> +<td><a href="#UnittestDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> +<td>Private slot called by a button of the button box clicked.</td> +</tr><tr> +<td><a href="#UnittestDialog.on_errorsListWidget_currentTextChanged">on_errorsListWidget_currentTextChanged</a></td> +<td>Private slot to handle the highlighted signal.</td> +</tr><tr> +<td><a href="#UnittestDialog.on_errorsListWidget_itemDoubleClicked">on_errorsListWidget_itemDoubleClicked</a></td> +<td>Private slot called by doubleclicking an errorlist entry.</td> +</tr><tr> +<td><a href="#UnittestDialog.on_fileDialogButton_clicked">on_fileDialogButton_clicked</a></td> +<td>Private slot to open a file dialog.</td> +</tr><tr> +<td><a href="#UnittestDialog.on_startButton_clicked">on_startButton_clicked</a></td> +<td>Public slot to start the test.</td> +</tr><tr> +<td><a href="#UnittestDialog.on_stopButton_clicked">on_stopButton_clicked</a></td> +<td>Private slot to stop the test.</td> +</tr><tr> +<td><a href="#UnittestDialog.on_testsuiteComboBox_editTextChanged">on_testsuiteComboBox_editTextChanged</a></td> +<td>Private slot to handle changes of the test file name.</td> +</tr><tr> +<td><a href="#UnittestDialog.testErrored">testErrored</a></td> +<td>Public method called if a test errors.</td> +</tr><tr> +<td><a href="#UnittestDialog.testFailed">testFailed</a></td> +<td>Public method called if a test fails.</td> +</tr><tr> +<td><a href="#UnittestDialog.testFinished">testFinished</a></td> +<td>Public method called if a test has finished.</td> +</tr><tr> +<td><a href="#UnittestDialog.testStarted">testStarted</a></td> +<td>Public method called if a test is about to be run.</td> +</tr> +</table> +<a NAME="UnittestDialog.__init__" ID="UnittestDialog.__init__"></a> +<h4>UnittestDialog (Constructor)</h4> +<b>UnittestDialog</b>(<i>prog = None, dbs = None, ui = None, parent = None, name = None</i>) +<p> + Constructor +</p><dl> +<dt><i>prog</i></dt> +<dd> +filename of the program to open +</dd><dt><i>dbs</i></dt> +<dd> +reference to the debug server object. It is an indication + whether we were called from within the eric5 IDE +</dd><dt><i>ui</i></dt> +<dd> +reference to the UI object +</dd><dt><i>parent</i></dt> +<dd> +parent widget of this dialog (QWidget) +</dd><dt><i>name</i></dt> +<dd> +name of this dialog (string) +</dd> +</dl><a NAME="UnittestDialog.__UTPrepared" ID="UnittestDialog.__UTPrepared"></a> +<h4>UnittestDialog.__UTPrepared</h4> +<b>__UTPrepared</b>(<i>nrTests, exc_type, exc_value</i>) +<p> + Private slot to handle the utPrepared signal. +</p><p> + If the unittest suite was loaded successfully, we ask the + client to run the test suite. +</p><dl> +<dt><i>nrTests</i></dt> +<dd> +number of tests contained in the test suite (integer) +</dd><dt><i>exc_type</i></dt> +<dd> +type of exception occured during preparation (string) +</dd><dt><i>exc_value</i></dt> +<dd> +value of exception occured during preparation (string) +</dd> +</dl><a NAME="UnittestDialog.__setProgressColor" ID="UnittestDialog.__setProgressColor"></a> +<h4>UnittestDialog.__setProgressColor</h4> +<b>__setProgressColor</b>(<i>color</i>) +<p> + Private methode to set the color of the progress color label. +</p><dl> +<dt><i>color</i></dt> +<dd> +colour to be shown (string) +</dd> +</dl><a NAME="UnittestDialog.__setRunningMode" ID="UnittestDialog.__setRunningMode"></a> +<h4>UnittestDialog.__setRunningMode</h4> +<b>__setRunningMode</b>(<i></i>) +<p> + Private method to set the GUI in running mode. +</p><a NAME="UnittestDialog.__setStoppedMode" ID="UnittestDialog.__setStoppedMode"></a> +<h4>UnittestDialog.__setStoppedMode</h4> +<b>__setStoppedMode</b>(<i></i>) +<p> + Private method to set the GUI in stopped mode. +</p><a NAME="UnittestDialog.__showSource" ID="UnittestDialog.__showSource"></a> +<h4>UnittestDialog.__showSource</h4> +<b>__showSource</b>(<i></i>) +<p> + Private slot to show the source of a traceback in an eric5 editor. +</p><a NAME="UnittestDialog.insertProg" ID="UnittestDialog.insertProg"></a> +<h4>UnittestDialog.insertProg</h4> +<b>insertProg</b>(<i>prog</i>) +<p> + Public slot to insert the filename prog into the testsuiteComboBox object. +</p><dl> +<dt><i>prog</i></dt> +<dd> +filename to be inserted (string) +</dd> +</dl><a NAME="UnittestDialog.insertTestName" ID="UnittestDialog.insertTestName"></a> +<h4>UnittestDialog.insertTestName</h4> +<b>insertTestName</b>(<i>testName</i>) +<p> + Public slot to insert a test name into the testComboBox object. +</p><dl> +<dt><i>testName</i></dt> +<dd> +name of the test to be inserted (string) +</dd> +</dl><a NAME="UnittestDialog.on_buttonBox_clicked" ID="UnittestDialog.on_buttonBox_clicked"></a> +<h4>UnittestDialog.on_buttonBox_clicked</h4> +<b>on_buttonBox_clicked</b>(<i>button</i>) +<p> + Private slot called by a button of the button box clicked. +</p><dl> +<dt><i>button</i></dt> +<dd> +button that was clicked (QAbstractButton) +</dd> +</dl><a NAME="UnittestDialog.on_errorsListWidget_currentTextChanged" ID="UnittestDialog.on_errorsListWidget_currentTextChanged"></a> +<h4>UnittestDialog.on_errorsListWidget_currentTextChanged</h4> +<b>on_errorsListWidget_currentTextChanged</b>(<i>text</i>) +<p> + Private slot to handle the highlighted signal. +</p><dl> +<dt><i>txt</i></dt> +<dd> +current text (string) +</dd> +</dl><a NAME="UnittestDialog.on_errorsListWidget_itemDoubleClicked" ID="UnittestDialog.on_errorsListWidget_itemDoubleClicked"></a> +<h4>UnittestDialog.on_errorsListWidget_itemDoubleClicked</h4> +<b>on_errorsListWidget_itemDoubleClicked</b>(<i>lbitem</i>) +<p> + Private slot called by doubleclicking an errorlist entry. +</p><p> + 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. +</p><dl> +<dt><i>lbitem</i></dt> +<dd> +the listbox item that was double clicked +</dd> +</dl><a NAME="UnittestDialog.on_fileDialogButton_clicked" ID="UnittestDialog.on_fileDialogButton_clicked"></a> +<h4>UnittestDialog.on_fileDialogButton_clicked</h4> +<b>on_fileDialogButton_clicked</b>(<i></i>) +<p> + Private slot to open a file dialog. +</p><a NAME="UnittestDialog.on_startButton_clicked" ID="UnittestDialog.on_startButton_clicked"></a> +<h4>UnittestDialog.on_startButton_clicked</h4> +<b>on_startButton_clicked</b>(<i></i>) +<p> + Public slot to start the test. +</p><a NAME="UnittestDialog.on_stopButton_clicked" ID="UnittestDialog.on_stopButton_clicked"></a> +<h4>UnittestDialog.on_stopButton_clicked</h4> +<b>on_stopButton_clicked</b>(<i></i>) +<p> + Private slot to stop the test. +</p><a NAME="UnittestDialog.on_testsuiteComboBox_editTextChanged" ID="UnittestDialog.on_testsuiteComboBox_editTextChanged"></a> +<h4>UnittestDialog.on_testsuiteComboBox_editTextChanged</h4> +<b>on_testsuiteComboBox_editTextChanged</b>(<i>txt</i>) +<p> + Private slot to handle changes of the test file name. +</p><dl> +<dt><i>txt</i></dt> +<dd> +name of the test file (string) +</dd> +</dl><a NAME="UnittestDialog.testErrored" ID="UnittestDialog.testErrored"></a> +<h4>UnittestDialog.testErrored</h4> +<b>testErrored</b>(<i>test, exc</i>) +<p> + Public method called if a test errors. +</p><dl> +<dt><i>test</i></dt> +<dd> +name of the failed test (string) +</dd><dt><i>exc</i></dt> +<dd> +string representation of the exception (list of strings) +</dd> +</dl><a NAME="UnittestDialog.testFailed" ID="UnittestDialog.testFailed"></a> +<h4>UnittestDialog.testFailed</h4> +<b>testFailed</b>(<i>test, exc</i>) +<p> + Public method called if a test fails. +</p><dl> +<dt><i>test</i></dt> +<dd> +name of the failed test (string) +</dd><dt><i>exc</i></dt> +<dd> +string representation of the exception (list of strings) +</dd> +</dl><a NAME="UnittestDialog.testFinished" ID="UnittestDialog.testFinished"></a> +<h4>UnittestDialog.testFinished</h4> +<b>testFinished</b>(<i></i>) +<p> + Public method called if a test has finished. +</p><p> + <b>Note</b>: It is also called if it has already failed or errored. +</p><a NAME="UnittestDialog.testStarted" ID="UnittestDialog.testStarted"></a> +<h4>UnittestDialog.testStarted</h4> +<b>testStarted</b>(<i>test, doc</i>) +<p> + Public method called if a test is about to be run. +</p><dl> +<dt><i>test</i></dt> +<dd> +name of the started test (string) +</dd><dt><i>doc</i></dt> +<dd> +documentation of the started test (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="UnittestWindow" ID="UnittestWindow"></a> +<h2>UnittestWindow</h2> +<p> + Main window class for the standalone dialog. +</p> +<h3>Derived from</h3> +QMainWindow +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#UnittestWindow.__init__">UnittestWindow</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#UnittestWindow.eventFilter">eventFilter</a></td> +<td>Public method to filter events.</td> +</tr> +</table> +<a NAME="UnittestWindow.__init__" ID="UnittestWindow.__init__"></a> +<h4>UnittestWindow (Constructor)</h4> +<b>UnittestWindow</b>(<i>prog = None, parent = None</i>) +<p> + Constructor +</p><dl> +<dt><i>prog</i></dt> +<dd> +filename of the program to open +</dd><dt><i>parent</i></dt> +<dd> +reference to the parent widget (QWidget) +</dd> +</dl><a NAME="UnittestWindow.eventFilter" ID="UnittestWindow.eventFilter"></a> +<h4>UnittestWindow.eventFilter</h4> +<b>eventFilter</b>(<i>obj, event</i>) +<p> + Public method to filter events. +</p><dl> +<dt><i>obj</i></dt> +<dd> +reference to the object the event is meant for (QObject) +</dd><dt><i>event</i></dt> +<dd> +reference to the event object (QEvent) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +flag indicating, whether the event was handled (boolean) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file