Skip to content

Commit e17bcc2

Browse files
committed
Adds 'hardware' pytest marker to robot integration tests and updates pytest.ini file
1 parent 183ff3a commit e17bcc2

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

pylabrobot/arms/precise_flex/precise_flex_api_tests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import unittest
22
import asyncio
3+
4+
import pytest
35
from pylabrobot.arms.precise_flex.precise_flex_api import PreciseFlexBackendApi
46
from contextlib import asynccontextmanager
57

6-
8+
@pytest.mark.hardware # include/exclude via "pytest -m hardware"
79
class PreciseFlexApiHardwareTests(unittest.IsolatedAsyncioTestCase):
810
"""Integration tests for PreciseFlex robot - RUNS ON ACTUAL HARDWARE"""
911

pylabrobot/arms/precise_flex/precise_flex_backend_tests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import unittest
22

3+
import pytest
4+
35
from pylabrobot.arms.backend import CartesianCoords, ElbowOrientation, JointCoords
46
from pylabrobot.arms.precise_flex.precise_flex_backend import PreciseFlexBackend
57

6-
8+
@pytest.mark.hardware # include/exclude via "pytest -m hardware"
79
class PreciseFlexBackendHardwareTests(unittest.IsolatedAsyncioTestCase):
810
"""Integration tests for PreciseFlex robot - RUNS ON ACTUAL HARDWARE"""
911
# Connection config

pytest.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[pytest]
22
python_files = *_tests.py
33

4+
markers = hardware: tests requiring connected devices
5+
6+
addopts = -m "not hardware"

0 commit comments

Comments
 (0)