File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ async def func(args):
7070 # We charge 1W per second
7171 # And discharge 10W per second
7272 # So should be roughly 20W - 6W consumed from starting 500
73- assert sat1 .battery_level_in_Ws > 480 and sat1 .battery_level_in_Ws < 490
73+ assert sat1 .battery_level_in_Ws > 475 and sat1 .battery_level_in_Ws < 490
7474
7575 # test removing the activity
7676 assert "Testing" in sim ._activity_manager ._activities .keys ()
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ async def test_activity():
2323 # init simulation
2424
2525 cfg = load_default_cfg () # loading cfg to modify defaults
26- cfg .sim .time_multiplier = 10 .0
26+ cfg .sim .time_multiplier = 5 .0
2727 sim = paseos .init_sim (sat1 , cfg )
2828
2929 # Initial power is 500
@@ -34,7 +34,7 @@ async def test_activity():
3434 test_val = [0 ]
3535
3636 async def func (args ):
37- for _ in range (10 ):
37+ for _ in range (5 ):
3838 args [0 ][0 ] += 1
3939 await asyncio .sleep (0.2 )
4040
@@ -48,12 +48,12 @@ async def func(args):
4848 await wait_for_activity (sim )
4949
5050 # Check activity result
51- assert test_val [0 ] == 10
51+ assert test_val [0 ] == 5
5252
5353 # Check power was depleted as expected
54- # Activity should run roughly 2s
54+ # Activity should run roughly 1s
5555 # We charge 1W per second
56- # 1s real time equals 10s simulation
56+ # 1s real time equals 5s simulation
5757 # And discharge 10W per second
58- # So should be roughly 200W - 20W consumed from starting 500
59- assert sat1 .battery_level_in_Ws > 315 and sat1 .battery_level_in_Ws < 325
58+ # So should be roughly 50W - 5W consumed from starting 500
59+ assert sat1 .battery_level_in_Ws > 350 and sat1 .battery_level_in_Ws <= 455
You can’t perform that action at this time.
0 commit comments