• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ByteOps-swe / MVP / 8490927449

30 Mar 2024 12:57PM UTC coverage: 42.353% (-51.8%) from 94.161%
8490927449

push

github

web-flow
Merge pull request #39 from ByteOps-swe/Barutta02-patch-2

Tolto test

27 of 126 branches covered (21.43%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

1143 existing lines in 77 files now uncovered.

981 of 2254 relevant lines covered (43.52%)

0.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/PythonSensorsSimulator/Model/Simulators/charging_station_simulator.py
1
import random
1✔
2
from .simulator import simulator
1✔
3
from .sensor_types import sensor_types
1✔
4

5
class charging_station_simulator(simulator):
1✔
6
    __count = 0
1✔
7
    __transition_probability = 0.1
1✔
8
    def __init__(self, latitude: float, longitude: float, cella: str = "Centro", initial_value=0):
1✔
UNCOV
9
        charging_station_simulator.__count += 1
×
UNCOV
10
        charging_station_simulator.__transition_probability = 0.1
×
UNCOV
11
        super().__init__(
×
12
            latitude,
13
            longitude,
14
            cella,
15
            f"ChS{charging_station_simulator.__count}",
16
            initial_value,
17
            sensor_types.CHARGING_STATION.value
18
        )
19

20
    def _generate_measure(self):
1✔
UNCOV
21
        if self._misurazione:
×
UNCOV
22
            new_probability = charging_station_simulator.__transition_probability
×
23
        else:
UNCOV
24
            new_probability = 1 - charging_station_simulator.__transition_probability
×
UNCOV
25
        self._misurazione = random.random() < new_probability
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc