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

ByteOps-swe / MVP / 8482421591

29 Mar 2024 03:10PM UTC coverage: 42.378% (-50.2%) from 92.581%
8482421591

push

github

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

Barutta02 patch 2

28 of 127 branches covered (22.05%)

Branch coverage included in aggregate %.

32 of 106 new or added lines in 5 files covered. (30.19%)

1069 existing lines in 72 files now uncovered.

995 of 2287 relevant lines covered (43.51%)

0.44 hits per line

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

45.45
/PythonSensorsSimulator/Model/Simulators/simulator.py
1
from abc import ABC, abstractmethod
1✔
2
from datetime import datetime
1✔
3
from .misurazione import misurazione
1✔
4
from .coordinate import coordinate
1✔
5

6
class simulator(ABC):
1✔
7
    def __init__(self,  latitude: float, longitude: float, cella: str, sensor_id: str, misurazione_iniziale = 0, _type =""):
1✔
UNCOV
8
        self.__ID_sensor = sensor_id
×
UNCOV
9
        self.__cella_sensore = cella
×
UNCOV
10
        self.__coordinate = coordinate(latitude,longitude)
×
UNCOV
11
        self._misurazione = misurazione_iniziale
×
UNCOV
12
        self.__type = _type
×
13

14
    #TEMPLATEMETHOD
15
    def simulate(self) -> misurazione:
1✔
UNCOV
16
        self._generate_measure()
×
UNCOV
17
        while not self._adapt():
×
18
            self._generate_measure()
×
UNCOV
19
        return misurazione(
×
20
            datetime.now(),
21
            self._misurazione,
22
            self.__type,
23
            self.__coordinate,
24
            self.__ID_sensor,
25
            self.__cella_sensore
26
        )
27

28
    @abstractmethod
1✔
29
    def _generate_measure(self) -> None:
1✔
30
        pass
×
31

32
    #Template empty method to override
33
    def _adapt(self) -> bool:
1✔
UNCOV
34
        return True
×
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