• 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

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