PyToxTest fix

script-generated content was passed as format argument to String.format leading to "bad format" errors
This commit is contained in:
Ilya.Kazakevich
2016-05-08 02:22:21 +03:00
parent acc1abb23f
commit ef1d754449
+6 -3
View File
@@ -204,10 +204,13 @@ public final class PyToxTest extends PyEnvTestCase {
Matchers.greaterThanOrEqualTo(myMinimumSuccessTestCount));
// Check expected output
final String message = String.format("Interpreter %s does not have expected string in output. \n ", interpreterName) +
String.format("All: %s \n", all) +
String.format("Error: %s \n", stderr);
Assert
.assertThat(String.format("Interpreter %s does not have expected string in output. \n " +
"All : " + all + "\n" +
"Error:" + stderr, interpreterName),
.assertThat(message,
getTestOutput(interpreterSuite), Matchers.containsString(myInterpreters.get(interpreterName).myExpectedOutput));
}