void (@Nullable String newName, @Nullable List<PyParameterInfo> parameters) { final PyChangeSignatureHandler changeSignatureHandler = new PyChangeSignatureHandler(); final PyFunction function = (PyFunction)changeSignatureHandler.findTargetMember(myFixture.getFile(), myFixture.getEditor()); assertNotNull(function); final PyFunction newFunction; // Accept modifying the base method final TestDialog oldTestDialog = TestDialogManager.setTestDialog(TestDialog.OK); try { newFunction = PyChangeSignatureHandler.getSuperMethod(function); } finally { TestDialogManager.setTestDialog(oldTestDialog); } assertNotNull(newFunction); final PyMethodDescriptor method = new PyMethodDescriptor(newFunction); final TestPyChangeSignatureDialog dialog = new TestPyChangeSignatureDialog(newFunction.getProject(), method); try { if (newName != null) { dialog.setNewName(newName); } if (parameters != null) { dialog.setParameterInfos(parameters); } final String validationError = dialog.validateAndCommitData(); assertNull(validationError); final BaseRefactoringProcessor baseRefactoringProcessor = dialog.createRefactoringProcessor(); assert baseRefactoringProcessor instanceof PyChangeSignatureProcessor; final PyChangeSignatureProcessor processor = (PyChangeSignatureProcessor)baseRefactoringProcessor; processor.run(); } finally { Disposer.dispose(dialog.getDisposable()); } }