cleanup (throws)

This commit is contained in:
Vladimir Krivosheev
2017-12-13 15:17:50 +01:00
parent c3ee276222
commit 3ccd243592
3 changed files with 10 additions and 23 deletions
@@ -1,17 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
package com.jetbrains.python.run;
@@ -137,7 +125,7 @@ public abstract class AbstractPythonRunConfiguration<T extends AbstractPythonRun
// tabs provided by extensions:
//noinspection unchecked
PythonRunConfigurationExtensionsManager.getInstance().appendEditors(this, (SettingsEditorGroup)group);
PythonRunConfigurationExtensionsManager.getInstance().appendEditors(this, group);
group.addEditor(ExecutionBundle.message("logs.tab.title"), new LogConfigurationPanel<>());
return group;
@@ -424,7 +412,7 @@ public abstract class AbstractPythonRunConfiguration<T extends AbstractPythonRun
@Override
public boolean excludeCompileBeforeLaunchOption() {
final Module module = getModule();
return module != null ? ModuleType.get(module) instanceof PythonModuleTypeBase : true;
return module == null || ModuleType.get(module) instanceof PythonModuleTypeBase;
}
public boolean canRunWithCoverage() {
@@ -3,7 +3,6 @@
*/
package com.jetbrains.python.testing.doctest;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.Executor;
import com.intellij.execution.configurations.ConfigurationFactory;
import com.intellij.execution.configurations.RunProfileState;
@@ -31,7 +30,7 @@ public class PythonDocTestRunConfiguration extends AbstractPythonLegacyTestRunCo
}
@Override
public RunProfileState getState(@NotNull final Executor executor, @NotNull final ExecutionEnvironment env) throws ExecutionException {
public RunProfileState getState(@NotNull final Executor executor, @NotNull final ExecutionEnvironment env) {
return new PythonDocTestCommandLineState(this, env);
}
@@ -1,3 +1,6 @@
/*
* Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
package com.jetbrains.env.python.testing;
import com.intellij.execution.configurations.RuntimeConfigurationWarning;
@@ -12,7 +15,6 @@ import com.jetbrains.python.testing.PyNoseTestFactory;
import com.jetbrains.python.testing.PyTestFrameworkService;
import com.jetbrains.python.tools.sdkTools.SdkCreationType;
import org.jetbrains.annotations.NotNull;
import org.junit.Assert;
import org.junit.Test;
import java.io.IOException;
@@ -24,9 +26,7 @@ import static org.junit.Assert.assertEquals;
*/
@EnvTestTagsRequired(tags = "nose")
public final class PythonNoseTestingTest extends PyEnvTestCase {
private final String myFrameworkName = PyTestFrameworkService.getSdkReadableNameByFramework(PyNames.NOSE_TEST);;
private final String myFrameworkName = PyTestFrameworkService.getSdkReadableNameByFramework(PyNames.NOSE_TEST);
@Test
public void testNoseGenerators() {
@@ -42,7 +42,7 @@ public final class PythonNoseTestingTest extends PyEnvTestCase {
@NotNull final String stdout,
@NotNull final String stderr,
@NotNull final String all) {
Assert.assertEquals("Nose genenerator produced bad tree", "Test tree:\n" +
assertEquals("Nose genenerator produced bad tree", "Test tree:\n" +
"[root]\n" +
".test_nose_generator\n" +
"..test_evens\n" +
@@ -285,7 +285,7 @@ public final class PythonNoseTestingTest extends PyEnvTestCase {
@NotNull String stdout,
@NotNull String stderr,
@NotNull String all) {
Assert.assertEquals("--slow runner broken on arguments" + myArguments, "Test tree:\n" +
assertEquals("--slow runner broken on arguments" + myArguments, "Test tree:\n" +
"[root]\n" +
".test_with_slow\n" +
"..test_fast(+)\n",