Skip to content

Commit

Permalink
Propagating class parameter name changes to unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
mchevalier2 committed Aug 7, 2024
1 parent d42f2af commit 97166d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tests/tests_sensor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
from datetime import datetime

from src.sensor import Sensor
from src_data_client.sensor import Sensor


class TestSensor(unittest.TestCase):
Expand Down Expand Up @@ -43,7 +43,7 @@ def test_anomalies(self):
0,
1000,
150,
start_time=datetime(2021, 9, 15, 10, 3, 30),
init_time=datetime(2021, 9, 15, 10, 3, 30),
p_fail=0.05,
p_anom=0.2,
)
Expand All @@ -55,7 +55,7 @@ def test_failures(self):
0,
1000,
150,
start_time=datetime(2021, 9, 15, 10, 3, 30),
init_time=datetime(2021, 9, 15, 10, 3, 30),
p_fail=0.05,
p_anom=0.2,
)
Expand Down
10 changes: 4 additions & 6 deletions tests/tests_store.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
import unittest
from datetime import datetime

from src.store import Store
from src_data_client.store import Store


class TestStore(unittest.TestCase):

def test_visits_store_sensors(self):
store = Store("REWE", 8, start_time=datetime(2023, 8, 4, 8))
store = Store("REWE", 8, opening_date=datetime(2023, 8, 4, 8))
visit_count = store.get_visits_store_sensors(dt=datetime(2024, 1, 22, 9))
self.assertEqual(visit_count, 4632)


def test_visits_store_day_sensor(self):
store = Store("REWE", 8, start_time=datetime(2023, 8, 4, 8))
store = Store("REWE", 8, opening_date=datetime(2023, 8, 4, 8))
visit_count = store.get_visits_store_day_sensor(0, dt=datetime(2024, 1, 22))
self.assertEqual(visit_count, 5878)


def test_visits_store_day(self):
store = Store("REWE", 8, start_time=datetime(2023, 8, 4, 8))
store = Store("REWE", 8, opening_date=datetime(2023, 8, 4, 8))
visit_count = store.get_visits_day_store(dt=datetime(2024, 1, 22))
self.assertEqual(visit_count, 51946)

Expand Down

0 comments on commit 97166d1

Please sign in to comment.