public void testToxenvPatternBlank() throws Exception { configureCPython2(); ToxBuilder builder = new ToxBuilder("tox.ini", false, "$FOOBAR"); MatrixProject project = createMatrixProject(); AxisList axes = new AxisList(new TextAxis("FOOBAR2", "badluck")); project.setScm(new ToxSCM("tox.ini", "[testenv]\ncommand = echo")); project.setAxes(axes); project.getBuildersList().add(builder); MatrixBuild build = project.scheduleBuild2(0).get(); List<MatrixRun> runs = build.getRuns(); assertEquals(1, runs.size()); MatrixRun run = runs.get(0); String log = FileUtils.readFileToString(run.getLogFile()); System.out.println(log); assertTrue( "should not be able to run with a blank TOXENV pattern:\n" + log, log.contains(Messages.ToxBuilder_ToxenvPattern_Invalid("$FOOBAR"))); }