Skip to content

Commit 451fd4e

Browse files
committed
80% start
1 parent 6fcaee7 commit 451fd4e

3 files changed

Lines changed: 45 additions & 6 deletions

File tree

.coverage

0 Bytes
Binary file not shown.

ChangeLog.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Updates
22

3+
4+
## 1.x.2 get to 80% update
5+
6+
### new things
7+
8+
- Suproting 100%
9+
10+
- Utility
11+
- collor 100%
12+
- deltatime 98%
13+
14+
- Data Prosesing
15+
- csv data pipeline 100%
16+
- filter 96%
17+
- map 91%
18+
19+
- contol softwere
20+
- State machine
21+
- x 0%
22+
23+
### bug Fix
24+
25+
- somthing
26+
27+
### changes
28+
29+
- somthing
30+
31+
### breaking changes
32+
33+
- somthing
34+
335
## 1.x.1 location update
436

537
### new things

Tests/UnitTest/Utility/test_DeltaTime.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pytest
2-
from GabesPythonToolBox.Utility.DeltaTime import DeltaTime, DeltaTimer
2+
from GabesPythonToolBox.Utility.DeltaTime import DeltaTime, DeltaTimer,StartDeltaTimer
33
from GabesPythonToolBox.Tests.UnitTestComon.UntTestUtility import almost_equal
44
import time
55

@@ -16,24 +16,29 @@ def test_deltatime_basic():
1616

1717
#DeltaTimer tests
1818

19+
1920
def test_deltatimer_start_and_update():
20-
timer = DeltaTimer(0.05) # 50ms timer
21+
timer = StartDeltaTimer(0.05) # 50ms timer
2122
# Initially not started
22-
assert timer.Update() is False
23+
assert timer() is False
2324
assert not timer.Finished
2425
# Start timer
2526
timer.startTimer()
2627
time.sleep(0.02)
27-
finished = timer.Update()
28+
finished = timer()
2829
assert finished is False
2930
# timeLeft should decrease
3031
assert timer.timeLeft < timer.duration
32+
# chek finished
33+
time.sleep(0.04)
34+
finished = timer()
35+
assert finished is True
3136

3237
def test_deltatimer_finish():
3338
timer = DeltaTimer(0.03)
3439
timer.startTimer()
3540
time.sleep(0.05)
36-
finished = timer.Update()
41+
finished = timer()
3742
assert finished is True
3843
assert timer.Finished
3944
assert timer.timeLeft <= 0
@@ -58,6 +63,8 @@ def test_deltatimer_stop():
5863
timer.stopTimer()
5964
assert timer.Finished
6065
assert timer.timeLeft == timer.timeLeft # no change after stop
66+
finished = timer()
67+
assert finished is True
6168

6269

6370
def test_deltatimer_recurrent_start_finish():
@@ -69,6 +76,6 @@ def test_deltatimer_recurrent_start_finish():
6976
while i < test_runs:
7077
timer.startTimer()
7178
time.sleep(0.05)
72-
assert timer.Update() is True
79+
assert timer() is True
7380
assert timer.Finished
7481
i+=1

0 commit comments

Comments
 (0)