void () { runPythonTest( new PyProcessWithConsoleTestTask<PyAbstractTestProcessRunner<PyToxConfiguration>>("/toxtest/toxPosArgs/", SdkCreationType.EMPTY_SDK) { @NotNull @Override protected PyAbstractTestProcessRunner<PyToxConfiguration> createProcessRunner() { return new MyTestProcessRunner() { @Override protected void configurationCreatedAndWillLaunch(@NotNull final PyToxConfiguration configuration) throws IOException { super.configurationCreatedAndWillLaunch(configuration); PyToxTestTools.setArguments(configuration, "--", "arg1"); } }; } @Override protected void checkTestResults(@NotNull final PyAbstractTestProcessRunner<PyToxConfiguration> runner, @NotNull final String stdout, @NotNull final String stderr, @NotNull final String all, int exitCode) { Assert.assertThat("Wrong sys.argv", stdout, Matchers.containsString("['spam.py', 'arg1']")); } @NotNull @Override public Set<String> getTags() { return Sets.newHashSet("tox"); } }); }