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

ByteOps-swe / MVP / 8236091020

11 Mar 2024 04:10PM UTC coverage: 86.212% (-0.1%) from 86.345%
8236091020

push

github

Barutta02
Merge branch 'develop' of https://github.com/ByteOps-swe/MVP into develop

74 of 78 new or added lines in 4 files covered. (94.87%)

4 existing lines in 2 files now uncovered.

1682 of 1951 relevant lines covered (86.21%)

0.86 hits per line

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

90.48
/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✔
8
        self.__ID_sensor = sensor_id
1✔
9
        self.__cella_sensore = cella
1✔
10
        self.__coordinate = Coordinate(latitude,longitude)
1✔
11
        self._misurazione = misurazione_iniziale
1✔
12
        self.__type = _type
1✔
13

14
    #TEMPLATEMETHOD
15
    def simulate(self) -> Misurazione:
1✔
16
        self._generate_measure()
1✔
17
        while not self._filter():
1✔
18
            self._generate_measure() #First template step
×
19
        return Misurazione(datetime.now(), self._misurazione , self.__type, self.__coordinate, self.__ID_sensor,self.__cella_sensore)
1✔
20

21
    @abstractmethod
1✔
22
    def _generate_measure(self) -> None:
1✔
UNCOV
23
        pass
×
24

25
    #Template empty method to override
26
    def _filter(self) -> bool:
1✔
27
        return True
1✔
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