• 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/Simulator.py
UNCOV
1
from abc import ABC, abstractmethod
×
UNCOV
2
from datetime import datetime
×
UNCOV
3
from .Misurazione import Misurazione
×
UNCOV
4
from .Coordinate import Coordinate
×
5

UNCOV
6
class Simulator(ABC):
×
UNCOV
7
    def __init__(self,  latitude: float, longitude: float, cella: str, sensor_id: str, misurazione_iniziale = 0, _type =""):
×
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
UNCOV
15
    def simulate(self) -> Misurazione:
×
UNCOV
16
        self._generate_measure()
×
UNCOV
17
        while not self._filter():
×
18
            self._generate_measure() #First template step
×
UNCOV
19
        return Misurazione(datetime.now(), self._misurazione , self.__type, self.__coordinate, self.__ID_sensor,self.__cella_sensore)
×
20

21

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

26
    #Template empty method to override
UNCOV
27
    def _filter(self) -> bool:
×
UNCOV
28
        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