• 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

41.94
/PythonSensorsSimulator/Model/Simulators/misurazione.py
1
from datetime import datetime
1✔
2
from .coordinate import coordinate
1✔
3

4
class misurazione():
1✔
5
    def __init__(self, timestamp: datetime, value, type_: str, coord: coordinate, ID_sensore: str, cella: str):
1✔
UNCOV
6
        self.__timestamp = timestamp
×
UNCOV
7
        self.__value = value
×
UNCOV
8
        self.__type = type_
×
UNCOV
9
        self.__coordinates = coord
×
UNCOV
10
        self.__ID_sensore = ID_sensore
×
UNCOV
11
        self.__cella = cella
×
12

13
    def get_timestamp(self):
1✔
UNCOV
14
        return self.__timestamp
×
15

16
    def get_value(self):
1✔
UNCOV
17
        return self.__value
×
18

19
    def get_type(self):
1✔
UNCOV
20
        return self.__type
×
21

22
    def get_latitude(self):
1✔
UNCOV
23
        return self.__coordinates.get_latitude()
×
24

25
    def get_longitude(self):
1✔
UNCOV
26
        return self.__coordinates.get_longitude()
×
27

28
    def get_ID_sensore(self):
1✔
UNCOV
29
        return self.__ID_sensore
×
30

31
    def get_cella(self):
1✔
UNCOV
32
        return self.__cella
×
33

34
    def to_string(self):
1✔
UNCOV
35
        return f"Timestamp: {self.__timestamp.replace(microsecond=0)}, Value: {round(self.__value,2)}, Type: {self.__type}, Coordinates: {self.__coordinates.get_latitude()},{self.__coordinates.get_longitude()}, Sensor ID: {self.__ID_sensore}, Cell: {self.__cella}"
×
36

37
    def __eq__(self, other):
1✔
UNCOV
38
        if not isinstance(other, misurazione):
×
39
            return False
×
UNCOV
40
        return (
×
41
            str(self.__timestamp) == str(other.__timestamp) and
42
            self.__value == other.__value and
43
            self.__type == other.__type and
44
            self.__coordinates == other.__coordinates and
45
            self.__ID_sensore == other.__ID_sensore and
46
            self.__cella == other.__cella
47
        )
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