diff -r 67d0ad66b59a -r 0d4e1033731b Documentation/Source/eric6.PyUnit.UnittestDialog.html --- a/Documentation/Source/eric6.PyUnit.UnittestDialog.html Tue Mar 26 19:38:12 2019 +0100 +++ b/Documentation/Source/eric6.PyUnit.UnittestDialog.html Tue Mar 26 19:39:42 2019 +0100 @@ -220,12 +220,33 @@ <td><a href="#UnittestDialog.__init__">UnittestDialog</a></td> <td>Constructor</td> </tr><tr> +<td><a href="#UnittestDialog.__UTDiscovered">__UTDiscovered</a></td> +<td>Private slot to handle the utPrepared signal.</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.__assembleTestCasesList">__assembleTestCasesList</a></td> +<td>Private method to assemble a list of test cases included in a test suite.</td> +</tr><tr> +<td><a href="#UnittestDialog.__discover">__discover</a></td> +<td>Private slot to discover unit test but don't run them.</td> +</tr><tr> +<td><a href="#UnittestDialog.__findDiscoveryItem">__findDiscoveryItem</a></td> +<td>Private method to find an item given the module path.</td> +</tr><tr> <td><a href="#UnittestDialog.__openEditor">__openEditor</a></td> <td>Private method to open an editor window for the given file.</td> </tr><tr> +<td><a href="#UnittestDialog.__populateDiscoveryResults">__populateDiscoveryResults</a></td> +<td>Private method to populate the test discovery results list.</td> +</tr><tr> +<td><a href="#UnittestDialog.__populateVenvComboBox">__populateVenvComboBox</a></td> +<td>Private method to (re-)populate the virtual environments selector.</td> +</tr><tr> +<td><a href="#UnittestDialog.__selectedTestCases">__selectedTestCases</a></td> +<td>Private method to assemble the list of selected test cases and suites.</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> @@ -238,12 +259,18 @@ <td><a href="#UnittestDialog.__showSource">__showSource</a></td> <td>Private slot to show the source of a traceback in an eric6 editor.</td> </tr><tr> +<td><a href="#UnittestDialog.__stopTests">__stopTests</a></td> +<td>Private slot to stop the test.</td> +</tr><tr> <td><a href="#UnittestDialog.closeEvent">closeEvent</a></td> <td>Protected method to handle the close event.</td> </tr><tr> <td><a href="#UnittestDialog.hasFailedTests">hasFailedTests</a></td> <td>Public method to check, if there are failed tests from the last run.</td> </tr><tr> +<td><a href="#UnittestDialog.insertDiscovery">insertDiscovery</a></td> +<td>Public slot to insert the discovery start directory into the discoveryPicker object.</td> +</tr><tr> <td><a href="#UnittestDialog.insertProg">insertProg</a></td> <td>Public slot to insert the filename prog into the testsuitePicker object.</td> </tr><tr> @@ -256,33 +283,30 @@ <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_discoverCheckBox_toggled">on_discoverCheckBox_toggled</a></td> +<td>Private slot handling state changes of the 'discover' checkbox.</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_startButton_clicked">on_startButton_clicked</a></td> -<td>Private 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_testsuitePicker_aboutToShowPathPickerDialog">on_testsuitePicker_aboutToShowPathPickerDialog</a></td> <td>Private slot called before the test suite selection dialog is shown.</td> </tr><tr> <td><a href="#UnittestDialog.on_testsuitePicker_editTextChanged">on_testsuitePicker_editTextChanged</a></td> -<td>Private slot to handle changes of the test file name.</td> +<td>Private slot handling changes of the test suite path.</td> </tr><tr> <td><a href="#UnittestDialog.on_testsuitePicker_pathSelected">on_testsuitePicker_pathSelected</a></td> <td>Private slot called after a test suite has been selected.</td> </tr><tr> -<td><a href="#UnittestDialog.on_venvComboBox_currentTextChanged">on_venvComboBox_currentTextChanged</a></td> -<td>Private slot to handle the selection of a virtual environment.</td> -</tr><tr> <td><a href="#UnittestDialog.setProjectMode">setProjectMode</a></td> <td>Public method to set the project mode of the dialog.</td> </tr><tr> +<td><a href="#UnittestDialog.startTests">startTests</a></td> +<td>Public slot to start the test.</td> +</tr><tr> <td><a href="#UnittestDialog.testErrored">testErrored</a></td> <td>Public method called if a test errors.</td> </tr><tr> @@ -332,6 +356,25 @@ <dd> name of this dialog </dd> +</dl><a NAME="UnittestDialog.__UTDiscovered" ID="UnittestDialog.__UTDiscovered"></a> +<h4>UnittestDialog.__UTDiscovered</h4> +<b>__UTDiscovered</b>(<i>testCases, 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>testCases</i> (str)</dt> +<dd> +list of detected test cases +</dd><dt><i>exc_type</i> (str)</dt> +<dd> +exception type occured during discovery +</dd><dt><i>exc_value</i> (str)</dt> +<dd> +value of exception occured during discovery +</dd> </dl><a NAME="UnittestDialog.__UTPrepared" ID="UnittestDialog.__UTPrepared"></a> <h4>UnittestDialog.__UTPrepared</h4> <b>__UTPrepared</b>(<i>nrTests, exc_type, exc_value</i>) @@ -351,6 +394,53 @@ <dd> value of exception occured during preparation (string) </dd> +</dl><a NAME="UnittestDialog.__assembleTestCasesList" ID="UnittestDialog.__assembleTestCasesList"></a> +<h4>UnittestDialog.__assembleTestCasesList</h4> +<b>__assembleTestCasesList</b>(<i>suite</i>) +<p> + Private method to assemble a list of test cases included in a test + suite. +</p><dl> +<dt><i>suite</i> (unittest.TestSuite)</dt> +<dd> +test suite to be inspected +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +list of tuples containing the test case ID and short + description +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +list of tuples of (str, str) +</dd> +</dl><a NAME="UnittestDialog.__discover" ID="UnittestDialog.__discover"></a> +<h4>UnittestDialog.__discover</h4> +<b>__discover</b>(<i></i>) +<p> + Private slot to discover unit test but don't run them. +</p><a NAME="UnittestDialog.__findDiscoveryItem" ID="UnittestDialog.__findDiscoveryItem"></a> +<h4>UnittestDialog.__findDiscoveryItem</h4> +<b>__findDiscoveryItem</b>(<i>modulePath</i>) +<p> + Private method to find an item given the module path. +</p><dl> +<dt><i>modulePath</i> (str)</dt> +<dd> +path of the module in dotted notation +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +reference to the item or None +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +QTreeWidgetItem or None +</dd> </dl><a NAME="UnittestDialog.__openEditor" ID="UnittestDialog.__openEditor"></a> <h4>UnittestDialog.__openEditor</h4> <b>__openEditor</b>(<i>filename, linenumber</i>) @@ -367,6 +457,41 @@ <dd> line number to place the cursor at </dd> +</dl><a NAME="UnittestDialog.__populateDiscoveryResults" ID="UnittestDialog.__populateDiscoveryResults"></a> +<h4>UnittestDialog.__populateDiscoveryResults</h4> +<b>__populateDiscoveryResults</b>(<i>tests</i>) +<p> + Private method to populate the test discovery results list. +</p><dl> +<dt><i>tests</i> (list of tuples of (str, str))</dt> +<dd> +list of tuples containing the discovery results +</dd> +</dl><a NAME="UnittestDialog.__populateVenvComboBox" ID="UnittestDialog.__populateVenvComboBox"></a> +<h4>UnittestDialog.__populateVenvComboBox</h4> +<b>__populateVenvComboBox</b>(<i></i>) +<p> + Private method to (re-)populate the virtual environments selector. +</p><a NAME="UnittestDialog.__selectedTestCases" ID="UnittestDialog.__selectedTestCases"></a> +<h4>UnittestDialog.__selectedTestCases</h4> +<b>__selectedTestCases</b>(<i>parent=None</i>) +<p> + Private method to assemble the list of selected test cases and suites. +</p><dl> +<dt><i>parent</i> (QTreeWidgetItem)</dt> +<dd> +reference to the parent item +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +list of selected test cases +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +list of str +</dd> </dl><a NAME="UnittestDialog.__setProgressColor" ID="UnittestDialog.__setProgressColor"></a> <h4>UnittestDialog.__setProgressColor</h4> <b>__setProgressColor</b>(<i>color</i>) @@ -392,6 +517,11 @@ <b>__showSource</b>(<i></i>) <p> Private slot to show the source of a traceback in an eric6 editor. +</p><a NAME="UnittestDialog.__stopTests" ID="UnittestDialog.__stopTests"></a> +<h4>UnittestDialog.__stopTests</h4> +<b>__stopTests</b>(<i></i>) +<p> + Private slot to stop the test. </p><a NAME="UnittestDialog.closeEvent" ID="UnittestDialog.closeEvent"></a> <h4>UnittestDialog.closeEvent</h4> <b>closeEvent</b>(<i>event</i>) @@ -412,6 +542,17 @@ <dd> flag indicating the presence of failed tests (boolean) </dd> +</dl><a NAME="UnittestDialog.insertDiscovery" ID="UnittestDialog.insertDiscovery"></a> +<h4>UnittestDialog.insertDiscovery</h4> +<b>insertDiscovery</b>(<i>start</i>) +<p> + Public slot to insert the discovery start directory into the + discoveryPicker object. +</p><dl> +<dt><i>start</i> (str)</dt> +<dd> +start directory name to be inserted +</dd> </dl><a NAME="UnittestDialog.insertProg" ID="UnittestDialog.insertProg"></a> <h4>UnittestDialog.insertProg</h4> <b>insertProg</b>(<i>prog</i>) @@ -453,6 +594,16 @@ <dd> button that was clicked (QAbstractButton) </dd> +</dl><a NAME="UnittestDialog.on_discoverCheckBox_toggled" ID="UnittestDialog.on_discoverCheckBox_toggled"></a> +<h4>UnittestDialog.on_discoverCheckBox_toggled</h4> +<b>on_discoverCheckBox_toggled</b>(<i>checked</i>) +<p> + Private slot handling state changes of the 'discover' checkbox. +</p><dl> +<dt><i>checked</i> (bool)</dt> +<dd> +state of the checkbox +</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>) @@ -478,35 +629,20 @@ <dd> the listbox item that was double clicked </dd> -</dl><a NAME="UnittestDialog.on_startButton_clicked" ID="UnittestDialog.on_startButton_clicked"></a> -<h4>UnittestDialog.on_startButton_clicked</h4> -<b>on_startButton_clicked</b>(<i>failedOnly=False</i>) -<p> - Private slot to start the test. -</p><dl> -<dt><i>failedOnly=</i></dt> -<dd> -flag indicating to run only failed tests (boolean) -</dd> -</dl><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_testsuitePicker_aboutToShowPathPickerDialog" ID="UnittestDialog.on_testsuitePicker_aboutToShowPathPickerDialog"></a> +</dl><a NAME="UnittestDialog.on_testsuitePicker_aboutToShowPathPickerDialog" ID="UnittestDialog.on_testsuitePicker_aboutToShowPathPickerDialog"></a> <h4>UnittestDialog.on_testsuitePicker_aboutToShowPathPickerDialog</h4> <b>on_testsuitePicker_aboutToShowPathPickerDialog</b>(<i></i>) <p> Private slot called before the test suite selection dialog is shown. </p><a NAME="UnittestDialog.on_testsuitePicker_editTextChanged" ID="UnittestDialog.on_testsuitePicker_editTextChanged"></a> <h4>UnittestDialog.on_testsuitePicker_editTextChanged</h4> -<b>on_testsuitePicker_editTextChanged</b>(<i>txt</i>) +<b>on_testsuitePicker_editTextChanged</b>(<i>path</i>) <p> - Private slot to handle changes of the test file name. + Private slot handling changes of the test suite path. </p><dl> -<dt><i>txt</i></dt> +<dt><i>path</i> (str)</dt> <dd> -name of the test file (string) +path of the test suite file </dd> </dl><a NAME="UnittestDialog.on_testsuitePicker_pathSelected" ID="UnittestDialog.on_testsuitePicker_pathSelected"></a> <h4>UnittestDialog.on_testsuitePicker_pathSelected</h4> @@ -518,16 +654,6 @@ <dd> file name of the test suite </dd> -</dl><a NAME="UnittestDialog.on_venvComboBox_currentTextChanged" ID="UnittestDialog.on_venvComboBox_currentTextChanged"></a> -<h4>UnittestDialog.on_venvComboBox_currentTextChanged</h4> -<b>on_venvComboBox_currentTextChanged</b>(<i>venvName</i>) -<p> - Private slot to handle the selection of a virtual environment. -</p><dl> -<dt><i>venvName</i> (str)</dt> -<dd> -name of the selected virtual environment -</dd> </dl><a NAME="UnittestDialog.setProjectMode" ID="UnittestDialog.setProjectMode"></a> <h4>UnittestDialog.setProjectMode</h4> <b>setProjectMode</b>(<i>forProject</i>) @@ -538,6 +664,16 @@ <dd> flag indicating to run for the open project </dd> +</dl><a NAME="UnittestDialog.startTests" ID="UnittestDialog.startTests"></a> +<h4>UnittestDialog.startTests</h4> +<b>startTests</b>(<i>failedOnly=False</i>) +<p> + Public slot to start the test. +</p><dl> +<dt><i>failedOnly=</i></dt> +<dd> +flag indicating to run only failed tests (boolean) +</dd> </dl><a NAME="UnittestDialog.testErrored" ID="UnittestDialog.testErrored"></a> <h4>UnittestDialog.testErrored</h4> <b>testErrored</b>(<i>test, exc, testId</i>)