use of com.google.devtools.build.lib.syntax.util.EvaluationTestCase in project bazel by bazelbuild.
the class SkylarkTestCase method createEvaluationTestCase.
protected EvaluationTestCase createEvaluationTestCase() {
return new EvaluationTestCase() {
@Override
public Environment newEnvironment() throws Exception {
Environment env = Environment.builder(mutability).setEventHandler(getEventHandler()).setGlobals(SkylarkModules.getGlobals(SkylarkModules.MODULES)).setPhase(Phase.LOADING).build().setupDynamic(PackageFactory.PKG_CONTEXT, // create rules. Creating actual rules is tested in SkylarkIntegrationTest.
new PackageContext(null, null, getEventHandler(), null));
SkylarkUtils.setToolsRepository(env, TestConstants.TOOLS_REPOSITORY);
return env;
}
};
}
Aggregations