Skip to content

Commit

Permalink
Merge pull request #150 from Geson-anko/BaseApp/test_getThreadSharedV…
Browse files Browse the repository at this point in the history
…alue_in_Start

UPDATE all app.py in TestEngineProject
  • Loading branch information
Geson-anko committed May 22, 2022
2 parents 0b2a1a3 + 589495c commit 58da7fa
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
7 changes: 6 additions & 1 deletion TestEngineProject/App0/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,9 @@ def Start(self) -> None:
assert self.getProcessSharedValue("MAIN.App0.shared_int").value == 0
assert self.getProcessSharedValue("MAIN.App1.shared_float").value == -10.0
assert self.getProcessSharedValue("MAIN.App1.App1_1.shared_bool").value == True
assert self.getProcessSharedValue("MAIN.App1.App1_2.shared_str").value == b"abc"
assert self.getProcessSharedValue("MAIN.App1.App1_2.shared_str").value == b"abc"

assert self.getThreadSharedValue("MAIN.App0.set_obj") == {"number"}
assert self.getThreadSharedValue("MAIN.App1.range_obj") is None
assert self.getThreadSharedValue("MAIN.App1.App1_1.tuple_obj") is None
assert self.getThreadSharedValue("MAIN.App1.App1_2.list_obj") is None
8 changes: 7 additions & 1 deletion TestEngineProject/App1/App1_1/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ def Start(self) -> None:
assert self.getProcessSharedValue("MAIN.App0.shared_int").value == 0
assert self.getProcessSharedValue("MAIN.App1.shared_float").value == -10.0
assert self.getProcessSharedValue("MAIN.App1.App1_1.shared_bool").value == True
assert self.getProcessSharedValue("MAIN.App1.App1_2.shared_str").value == b"abc"
assert self.getProcessSharedValue("MAIN.App1.App1_2.shared_str").value == b"abc"

assert self.getThreadSharedValue("MAIN.App0.set_obj") is None
assert self.getThreadSharedValue("MAIN.App1.range_obj") == range(10)
assert self.getThreadSharedValue("MAIN.App1.App1_1.tuple_obj") == (True, False)
assert self.getThreadSharedValue("MAIN.App1.App1_2.list_obj") is None

7 changes: 6 additions & 1 deletion TestEngineProject/App1/App1_2/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@ def Start(self) -> None:
assert self.getProcessSharedValue("MAIN.App0.shared_int").value == 0
assert self.getProcessSharedValue("MAIN.App1.shared_float").value == -10.0
assert self.getProcessSharedValue("MAIN.App1.App1_1.shared_bool").value == True
assert self.getProcessSharedValue("MAIN.App1.App1_2.shared_str").value == b"abc"
assert self.getProcessSharedValue("MAIN.App1.App1_2.shared_str").value == b"abc"

assert self.getThreadSharedValue("MAIN.App0.set_obj") is None
assert self.getThreadSharedValue("MAIN.App1.range_obj") is None
assert self.getThreadSharedValue("MAIN.App1.App1_1.tuple_obj") is None
assert self.getThreadSharedValue("MAIN.App1.App1_2.list_obj") == [1,2,3]
7 changes: 6 additions & 1 deletion TestEngineProject/App1/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ def Start(self) -> None:
assert self.getProcessSharedValue("MAIN.App0.shared_int").value == 0
assert self.getProcessSharedValue("MAIN.App1.shared_float").value == -10.0
assert self.getProcessSharedValue("MAIN.App1.App1_1.shared_bool").value == True
assert self.getProcessSharedValue("MAIN.App1.App1_2.shared_str").value == b"abc"
assert self.getProcessSharedValue("MAIN.App1.App1_2.shared_str").value == b"abc"

assert self.getThreadSharedValue("MAIN.App0.set_obj") is None
assert self.getThreadSharedValue("MAIN.App1.range_obj") == range(10)
assert self.getThreadSharedValue("MAIN.App1.App1_1.tuple_obj") == (True, False)
assert self.getThreadSharedValue("MAIN.App1.App1_2.list_obj") is None

0 comments on commit 58da7fa

Please sign in to comment.