Skip to content

Commit

Permalink
Adding better testing of piper
Browse files Browse the repository at this point in the history
  • Loading branch information
haixuanTao committed Nov 13, 2024
1 parent 313ef33 commit b460b9a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
5 changes: 4 additions & 1 deletion node-hub/dora-piper/dora_piper/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import os
import time

TEACH_MODE = False
TEACH_MODE = (
os.getenv("TEACH_MODE", "False") == "True"
or os.getenv("TEACH_MODE", "False") == "true"
)


def enable_fun(piper: C_PiperInterface):
Expand Down
10 changes: 3 additions & 7 deletions node-hub/dora-piper/tests/test_piper.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
def test_import_main():
import piper_sdk
from piper_sdk import C_PiperInterface

# from opencv_video_capture.main import main
# skip test as pyorbbecksdk installation is a bit complicated

# Check that everything is working, and catch dora Runtime Exception as we're not running in a dora dataflow.
# with pytest.raises(RuntimeError):
# main()
## Test piper installation
assert C_PiperInterface
2 changes: 1 addition & 1 deletion node-hub/dora-pyorbbecksdk/tests/test_pyorbbecksdk.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def test_import_main():
return # Remove this if you want to test pyorbbecksdk installation
import pyorbbecksdk
# import pyorbbecksdk

# from opencv_video_capture.main import main
# skip test as pyorbbecksdk installation is a bit complicated
Expand Down
5 changes: 1 addition & 4 deletions node-hub/dora-ugv/tests/test_ugv.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import pytest


def test_import_main():
return # Remove this if you want to test ugv_sdk_py installation

import ugv_sdk_py
# import ugv_sdk_py

# from opencv_video_capture.main import main
# skip test as pyorbbecksdk installation is a bit complicated
Expand Down

0 comments on commit b460b9a

Please sign in to comment.