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

ByteOps-swe / MVP / 8215196951

09 Mar 2024 02:27PM UTC coverage: 9.381% (-61.8%) from 71.198%
8215196951

push

github

Shinji76
Merge branch 'develop' into Action-test

47 of 59 new or added lines in 6 files covered. (79.66%)

956 existing lines in 41 files now uncovered.

144 of 1535 relevant lines covered (9.38%)

0.09 hits per line

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

0.0
/PythonSensorsSimulator/Model/Simulators/ChargingStationSimulator.py
UNCOV
1
import random
×
UNCOV
2
from .Simulator import Simulator
×
UNCOV
3
from .SensorTypes import SensorTypes
×
4

UNCOV
5
class ChargingStationSimulator(Simulator):
×
UNCOV
6
    __count = 0
×
UNCOV
7
    __transition_probability = 0.1
×
UNCOV
8
    def __init__(self, latitude: float, longitude: float, cella: str = "Centro", initial_value=0):
×
UNCOV
9
        ChargingStationSimulator.__count += 1
×
UNCOV
10
        ChargingStationSimulator.__transition_probability = 0.1
×
UNCOV
11
        super().__init__(latitude, longitude,cella,
×
12
                         f"ChS{ChargingStationSimulator.__count}", initial_value, SensorTypes.CHARGING_STATION.value)
13

UNCOV
14
    def _generate_measure(self):
×
UNCOV
15
        if self._misurazione:
×
16
            new_probability = ChargingStationSimulator.__transition_probability
×
17
        else:
UNCOV
18
            new_probability = 1 - ChargingStationSimulator.__transition_probability
×
UNCOV
19
        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