147 def on_fileDialogButton_clicked(self): |
147 def on_fileDialogButton_clicked(self): |
148 """ |
148 """ |
149 Private slot to open a file dialog. |
149 Private slot to open a file dialog. |
150 """ |
150 """ |
151 if self.dbs: |
151 if self.dbs: |
152 pyExtensions = \ |
152 py2Extensions = \ |
153 ' '.join(["*{0}".format(ext) |
153 ' '.join(["*{0}".format(ext) |
154 for ext in self.dbs.getExtensions('Python')]) |
154 for ext in self.dbs.getExtensions('Python2')]) |
155 py3Extensions = \ |
155 py3Extensions = \ |
156 ' '.join(["*{0}".format(ext) |
156 ' '.join(["*{0}".format(ext) |
157 for ext in self.dbs.getExtensions('Python3')]) |
157 for ext in self.dbs.getExtensions('Python3')]) |
158 filter = self.trUtf8( |
158 filter = self.trUtf8( |
159 "Python3 Files ({1});;Python2 Files ({0});;All Files (*)")\ |
159 "Python3 Files ({1});;Python2 Files ({0});;All Files (*)")\ |
160 .format(pyExtensions, py3Extensions) |
160 .format(py2Extensions, py3Extensions) |
161 else: |
161 else: |
162 filter = self.trUtf8("Python Files (*.py);;All Files (*)") |
162 filter = self.trUtf8("Python Files (*.py);;All Files (*)") |
163 prog = QFileDialog.getOpenFileName( |
163 prog = QFileDialog.getOpenFileName( |
164 self, |
164 self, |
165 "", |
165 "", |
177 Private slot to handle changes of the test file name. |
177 Private slot to handle changes of the test file name. |
178 |
178 |
179 @param txt name of the test file (string) |
179 @param txt name of the test file (string) |
180 """ |
180 """ |
181 if self.dbs: |
181 if self.dbs: |
182 exts = self.dbs.getExtensions("Python") |
182 exts = self.dbs.getExtensions("Python3") |
183 if txt.endswith(exts): |
183 if txt.endswith(exts): |
184 self.coverageCheckBox.setChecked(False) |
184 self.coverageCheckBox.setChecked(False) |
185 self.coverageCheckBox.setEnabled(False) |
185 self.coverageCheckBox.setEnabled(False) |
186 self.localCheckBox.setChecked(False) |
186 self.localCheckBox.setChecked(False) |
187 self.localCheckBox.setEnabled(False) |
187 self.localCheckBox.setEnabled(False) |