• 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

35.0
/PythonSensorsSimulator/Model/Simulators/temperature_simulator.py
1
import random
1✔
2
from .simulator import simulator
1✔
3
from .sensor_types import sensor_types
1✔
4

5
class temperature_simulator(simulator):
1✔
6
    __count = 0
1✔
7

8
    def __init__(self, latitude: float, longitude: float, cella: str = "Centro", initial_temperature=20):
1✔
UNCOV
9
        temperature_simulator.__count += 1
×
UNCOV
10
        super().__init__(
×
11
            latitude,
12
            longitude,
13
            cella,
14
            f"Tmp{temperature_simulator.__count}",
15
            initial_temperature,
16
            sensor_types.TEMPERATURE.value
17
        )
18

19
    def _generate_measure(self) -> None:
1✔
UNCOV
20
        variation = random.uniform(-0.5, 0.5)
×
UNCOV
21
        new_measurement = self._misurazione + variation
×
UNCOV
22
        if -15 <= new_measurement <= 45:
×
UNCOV
23
            self._misurazione = new_measurement
×
UNCOV
24
        if self._misurazione < -15:
×
25
            self._misurazione += 0.5
×
UNCOV
26
        if self._misurazione > 45:
×
27
            self._misurazione -= 0.5
×
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