PythonCoverageSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .name("Cobertura Sensor for Python coverage") .onlyOnLanguage(Python.KEY); } PythonCoverageSensor(AnalysisWarningsWrapper analysisWarnings); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); static final String REPORT_PATHS_KEY; static final String DEFAULT_REPORT_PATH; static final String REPORT_PATH_KEY; }
@Test public void sensor_descriptor() { DefaultSensorDescriptor descriptor = new DefaultSensorDescriptor(); new PythonCoverageSensor(analysisWarnings).describe(descriptor); assertThat(descriptor.name()).isEqualTo("Cobertura Sensor for Python coverage"); assertThat(descriptor.languages()).containsOnly("py"); }