-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
783dd97
commit 69dcb34
Showing
4 changed files
with
32 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
import subprocess | ||
import time | ||
|
||
@pytest.fixture(scope="session") | ||
def ros_launch(request): | ||
process = subprocess.Popen(['ros2', 'launch', 'infra', 'initialization_failure.launch.py'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) | ||
yield process | ||
process.terminate() | ||
process.wait() | ||
|
||
def test_check_output(ros_launch): | ||
msg = 'Goal failed' | ||
time.sleep(200) # Adjust the sleep time as needed | ||
stdout, stderr = ros_launch.communicate() | ||
assert msg in stdout, f"Expected '{msg}' not found in the output." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
import subprocess | ||
import time | ||
|
||
@pytest.fixture(scope="session") | ||
def ros_launch(request): | ||
process = subprocess.Popen(['ros2', 'launch', 'infra', 'initialization_success.launch.py'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) | ||
yield process | ||
process.terminate() | ||
process.wait() | ||
|
||
def test_check_output(ros_launch): | ||
msg = 'Goal succeeded' | ||
time.sleep(200) # Adjust the sleep time as needed | ||
stdout, stderr = ros_launch.communicate() | ||
assert msg in stdout, f"Expected '{msg}' not found in the output." |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.