aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-09-30 11:33:29 -0400
committerScott Murray <scott.murray@konsulko.com>2020-09-30 19:26:53 -0400
commitccd9a05cd6540c11601b83ccaa206127725bf5fd (patch)
treef6305e8f703bcc285c5f73f1c31a9dde8f88a3b1
parente29a6e10bb687cb2a4dca84e8c41bd50948ee534 (diff)
Remove "regular" test marking
Remove the "regular" test marking to simplify things. At the moment it provides no real separation from the set of tests proscribed by "not hwrequired", and things like J1939 need to be dynamically skipped based on platform support instead of requiring manual mark specification. Bug-AGL: SPEC-3585 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ic21cb84c499af9b63c83d145f3ffefaae4fda357
-rw-r--r--README.md2
-rw-r--r--pyagl/pytest.ini12
-rw-r--r--pyagl/tests/test_audiomixer.py1
-rw-r--r--pyagl/tests/test_bluetooth.py10
-rw-r--r--pyagl/tests/test_bluetooth_map.py1
-rw-r--r--pyagl/tests/test_bluetooth_pbap.py1
-rw-r--r--pyagl/tests/test_can.py35
-rw-r--r--pyagl/tests/test_geoclue.py3
-rw-r--r--pyagl/tests/test_gps.py7
-rw-r--r--pyagl/tests/test_homescreen.py2
-rw-r--r--pyagl/tests/test_mediascanner.py3
-rw-r--r--pyagl/tests/test_network.py29
-rw-r--r--pyagl/tests/test_nfc.py2
-rw-r--r--pyagl/tests/test_signal_composer.py11
-rw-r--r--pyagl/tests/test_weather.py2
15 files changed, 13 insertions, 108 deletions
diff --git a/README.md b/README.md
index be8c283..e99f9c7 100644
--- a/README.md
+++ b/README.md
@@ -79,8 +79,8 @@ On target, the command would be:
pytest /usr/lib/python3.8/site-packages/pyagl/tests
```
Note that the tests have been labelled with `pytest` markers to allow selecting or deselecting tests with the `pytest` '-k' option. Each binding's test are marked with the name of the binding, with additional markers that include:
-* regular - all regular verb tests with expected values
* hwrequired - verb tests requiring available physical hardware
+* can_j1939 - CAN binding tests specific to J1939 protocol
#### Examples
Running just the tests for a single binding (audiomixer):
diff --git a/pyagl/pytest.ini b/pyagl/pytest.ini
index 9eec573..57522c2 100644
--- a/pyagl/pytest.ini
+++ b/pyagl/pytest.ini
@@ -2,19 +2,19 @@
norecursedirs = templates
markers =
- regular: regular verb tests with expected values
hwrequired: verb tests requiring available physical hardware
audiomixer: agl-service-audiomixer tests
bluetooth: agl-service-bluetooth tests
bluetooth_map: agl-service-bluetooth-map tests
bluetooth_pbap: agl-service-bluetooth-pbap tests
+ can_low_level: agl-service-can-low-level tests
+ can_j1939: J1939 CAN specific tests
geoclue: agl-service-geoclue tests
+ gps: agl-service-gps tests
homescreen: agl-service-homescreen tests
+ mediascanner: agl-service-mediascanner tests
network: agl-service-network tests
nfc: agl-service-nfc tests
- gps: agl-service-gps tests
- weather: agl-service-weather tests
- mediascanner: agl-service-mediascanner tests
+ radio: agl-service-radio tests
signal_composer: agl-service-signal-composer tests
- can_low_level: agl-service-can-low-level tests
- can_j1939: J1939 CAN specific tests
+ weather: agl-service-weather tests
diff --git a/pyagl/tests/test_audiomixer.py b/pyagl/tests/test_audiomixer.py
index 000d9e9..5f9b7d0 100644
--- a/pyagl/tests/test_audiomixer.py
+++ b/pyagl/tests/test_audiomixer.py
@@ -41,7 +41,6 @@ async def service():
await ams.websocket.close()
-@pytest.mark.regular
async def test_list_controls(event_loop, service: AMS):
msgid = await service.list_controls()
resp = await service.afbresponse()
diff --git a/pyagl/tests/test_bluetooth.py b/pyagl/tests/test_bluetooth.py
index 95d2888..197c2c2 100644
--- a/pyagl/tests/test_bluetooth.py
+++ b/pyagl/tests/test_bluetooth.py
@@ -54,7 +54,6 @@ def btaddr():
return bthtestaddr
-@pytest.mark.regular
@pytest.mark.dependency
async def test_default_adapter(event_loop, service: BTS):
msgid = await service.default_adapter('hci0')
@@ -64,62 +63,53 @@ async def test_default_adapter(event_loop, service: BTS):
assert resp.data['adapter'] == 'hci0'
-@pytest.mark.regular
async def test_subscribe_device_changes(event_loop, service: BTS):
msgid = await service.subscribe('device_changes')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_unsubscribe_device_changes(event_loop, service: BTS):
msgid = await service.unsubscribe('device_changes')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_subscribe_adapter_changes(event_loop, service: BTS):
msgid = await service.subscribe('adapter_changes')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_unsubscribe_adapter_changes(event_loop, service: BTS):
msgid = await service.unsubscribe('adapter_changes')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_subscribe_media(event_loop, service: BTS):
msgid = await service.subscribe('media')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_unsubscribe_media(event_loop, service: BTS):
msgid = await service.unsubscribe('media')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_subscribe_agent(event_loop, service: BTS):
msgid = await service.subscribe('agent')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_unsubscribe_agent(event_loop, service: BTS):
msgid = await service.unsubscribe('agent')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
@pytest.mark.dependency(depends=['test_default_adapter'])
async def test_managed_objects(event_loop, service: BTS):
msgid = await service.managed_objects()
diff --git a/pyagl/tests/test_bluetooth_map.py b/pyagl/tests/test_bluetooth_map.py
index 09a9860..5ea5c17 100644
--- a/pyagl/tests/test_bluetooth_map.py
+++ b/pyagl/tests/test_bluetooth_map.py
@@ -86,7 +86,6 @@ async def test_message_verb(event_loop, service, messages):
assert resp.status == 'success'
-@pytest.mark.regular
@pytest.mark.dependency
async def test_subscribe_notifications(event_loop, service: BMP):
msgid = await service.subscribe('notification')
diff --git a/pyagl/tests/test_bluetooth_pbap.py b/pyagl/tests/test_bluetooth_pbap.py
index af1d0e4..61883f6 100644
--- a/pyagl/tests/test_bluetooth_pbap.py
+++ b/pyagl/tests/test_bluetooth_pbap.py
@@ -58,7 +58,6 @@ def searchvcf():
return vcf
-@pytest.mark.regular
@pytest.mark.dependency
async def test_status(event_loop, service: PBAP):
msgid = await service.status()
diff --git a/pyagl/tests/test_can.py b/pyagl/tests/test_can.py
index ba41202..70403df 100644
--- a/pyagl/tests/test_can.py
+++ b/pyagl/tests/test_can.py
@@ -74,22 +74,20 @@ hsmessage = {'bus_name': 'hs',
'can_data': [255, 255, 255, 255, 255, 255, 255, 255]
}}
+
@pytest.mark.dependency
-@pytest.mark.regular
async def test_list(event_loop, service: cs):
msgid = await service.list()
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_get(event_loop, service: cs):
msgid = await service.get("engine.speed")
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
# @pytest.mark.dependency(depends=['test_list'])
async def test_get_all_messages(event_loop, service: cs):
msgid = await service.list()
@@ -101,49 +99,42 @@ async def test_get_all_messages(event_loop, service: cs):
assert resp.status == 'success', f'.get() failed with message {m}'
-@pytest.mark.regular
async def test_auth(event_loop, service: cs):
msgid = await service.auth()
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_write_wo_auth(event_loop, service: cs):
msgid = await service.write({'signal_name': 'engine.speed', 'signal_value': 12})
resp = await service.afbresponse()
assert resp.type == AFBT.ERROR
-@pytest.mark.regular
async def test_write(event_loop, service: cs):
msgid = await service.write({"signal_name": "hvac.temperature.left", "signal_value": 21})
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_write_raw(event_loop, service: cs):
msgid = await service.write(hsmessage)
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_write_unwritable_signal(event_loop, service: cs):
msgid = await service.write({'signal_name': 'vehicle.average.speed', 'signal_value': 1234})
resp = await service.afbresponse()
assert resp.type == AFBT.ERROR
-@pytest.mark.regular
async def test_write_wrong_value_key(event_loop, service: cs):
msgid = await service.write({'name': 'vehicle.average.speed', 'signal_value': 21})
resp = await service.afbresponse()
assert resp.type == AFBT.ERROR
-@pytest.mark.regular
async def test_write_raw_invalid_bus_key(event_loop, service: cs):
message = dict(hsmessage)
message['bus'] = message.pop('bus_name')
@@ -152,7 +143,6 @@ async def test_write_raw_invalid_bus_key(event_loop, service: cs):
assert resp.type == AFBT.ERROR
-@pytest.mark.regular
async def test_write_raw_invalid_frame_key(event_loop, service: cs):
message = dict(hsmessage)
message['fram'] = message.pop('frame')
@@ -161,7 +151,6 @@ async def test_write_raw_invalid_frame_key(event_loop, service: cs):
assert resp.type == AFBT.ERROR
-@pytest.mark.regular
async def test_write_raw_invalid_can_id_key(event_loop, service: cs):
message = dict(hsmessage)
message['frame']['id'] = message['frame'].pop('can_id')
@@ -170,7 +159,6 @@ async def test_write_raw_invalid_can_id_key(event_loop, service: cs):
assert resp.type == AFBT.ERROR
-@pytest.mark.regular
async def test_write_raw_invalid_can_id_args(event_loop, service: cs):
message = dict(hsmessage)
message['frame']['can_id'] = "1568"
@@ -179,7 +167,6 @@ async def test_write_raw_invalid_can_id_args(event_loop, service: cs):
assert resp.type == AFBT.ERROR
-@pytest.mark.regular
async def test_write_raw_invalid_can_dlc_key(event_loop, service: cs):
message = dict(hsmessage)
message['frame']['dlc'] = message['frame'].pop('can_dlc')
@@ -188,7 +175,6 @@ async def test_write_raw_invalid_can_dlc_key(event_loop, service: cs):
assert resp.type == AFBT.ERROR
-@pytest.mark.regular
async def test_write_raw_invalid_can_dlc_args(event_loop, service: cs):
message = dict(hsmessage)
message['frame']['can_dlc'] = "8"
@@ -197,7 +183,6 @@ async def test_write_raw_invalid_can_dlc_args(event_loop, service: cs):
assert resp.type == AFBT.ERROR
-@pytest.mark.regular
async def test_write_raw_invalid_can_data_key(event_loop, service: cs):
message = dict(hsmessage)
message['frame']['data'] = message['frame'].pop('can_data')
@@ -206,7 +191,6 @@ async def test_write_raw_invalid_can_data_key(event_loop, service: cs):
assert resp.type == AFBT.ERROR
-@pytest.mark.regular
async def test_write_raw_invalid_can_data_value(event_loop, service: cs):
message = dict(hsmessage)
message['frame']['can_data'] = ["255", 255, 255, 255, 255, 255, 255, 255]
@@ -215,14 +199,12 @@ async def test_write_raw_invalid_can_data_value(event_loop, service: cs):
assert resp.type == AFBT.ERROR
-@pytest.mark.regular
async def test_get_written_message(event_loop, service: cs):
msgid = await service.get("hvac.temperature.left")
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
@pytest.mark.dependency
async def test_subscribe(event_loop, service: cs):
msgid = await service.subscribe('*')
@@ -230,7 +212,6 @@ async def test_subscribe(event_loop, service: cs):
assert resp.status == 'success', resp.info
-@pytest.mark.regular
@pytest.mark.dependency(depends=['test_subscribe'])
async def test_unsubscribe(event_loop, service: cs):
msgid = await service.unsubscribe('*')
@@ -238,7 +219,6 @@ async def test_unsubscribe(event_loop, service: cs):
assert resp.status == 'success', resp.info
-@pytest.mark.regular
@pytest.mark.parametrize('canplayer', ['test1.canreplay'], indirect=True)
async def test_diagnostic_engine_speed_simulation(event_loop, service: cs, canplayer):
eventname = 'diagnostic_messages.engine.speed'
@@ -260,7 +240,6 @@ async def test_diagnostic_engine_speed_simulation(event_loop, service: cs, canpl
break
-@pytest.mark.regular
@pytest.mark.parametrize('canplayer', ['test2-3.canreplay'], indirect=True)
async def test_Subscribe_all(event_loop, service: cs, canplayer):
eventname = 'messages.vehicle.average.speed'
@@ -285,7 +264,6 @@ async def test_Subscribe_all(event_loop, service: cs, canplayer):
# Filter tests
-@pytest.mark.regular
@pytest.mark.parametrize('canplayer', ['testFilter01filteredOut.canreplay'], indirect=True)
async def test_Filter_Test_01_Step_1(event_loop, service: cs, canplayer):
minspeed = 30
@@ -307,8 +285,6 @@ async def test_Filter_Test_01_Step_1(event_loop, service: cs, canplayer):
break
-
-@pytest.mark.regular
@pytest.mark.parametrize('canplayer', ['testFilter01pass.canreplay'], indirect=True)
async def test_Filter_Test_01_Step_2(event_loop, service: cs, canplayer):
minspeed = 30
@@ -332,7 +308,6 @@ async def test_Filter_Test_01_Step_2(event_loop, service: cs, canplayer):
break
-@pytest.mark.regular
@pytest.mark.parametrize('canplayer', ['test2-3.canreplay'], indirect=True)
async def test_Filter_Test_01_Step_3(event_loop, service: cs, canplayer):
# this testcase is supposed to test event filter frequency
@@ -367,10 +342,12 @@ async def test_Filter_Test_01_Step_3(event_loop, service: cs, canplayer):
# end of Filter tests
+#
# J1939 tests
+#
+
# Un/Subscription tests
-@pytest.mark.can_j1939
@pytest.mark.xfail(reason="J1939 support may not be available in the kernel")
async def test_low_can_subscribe_j1939_event(event_loop, service: cs):
msgid = await service.subscribe('Eng.Momentary.Overspeed.Enable')
@@ -504,9 +481,7 @@ async def test_low_can_subscribe_j1939_no_pgn(event_loop, service: cs):
# End of Un/Subscription tests
# Write tests
-#
-@pytest.mark.regular
async def test_low_can_write_wo_auth(event_loop, service: cs):
msgid = await service.write({'signal_name': 'Eng.Momentary.Overspeed.Enable', 'signal_value': 1})
async for resp in service.listener(): # using a listener because sometimes there are events in the queue from
@@ -518,14 +493,12 @@ async def test_low_can_write_wo_auth(event_loop, service: cs):
assert resp.msgid == msgid
break
-@pytest.mark.regular
async def test_low_can_write_auth(event_loop, service: cs):
msgid = await service.auth()
resp = await service.afbresponse()
assert resp.status == 'success', resp
-@pytest.mark.regular
@pytest.mark.xfail(reason='J1939 write messages are failing')
async def test_low_can_write_signal(event_loop, service: cs):
msgid = await service.write({'signal_name': 'Eng.Momentary.Overspeed.Enable', 'signal_value': 1})
diff --git a/pyagl/tests/test_geoclue.py b/pyagl/tests/test_geoclue.py
index 6d9d025..1853ec8 100644
--- a/pyagl/tests/test_geoclue.py
+++ b/pyagl/tests/test_geoclue.py
@@ -38,7 +38,6 @@ async def service():
yield svc
await svc.websocket.close()
-@pytest.mark.regular
async def test_location(event_loop, service: gcs):
msgid = await service.location()
resp = await service.afbresponse()
@@ -50,7 +49,6 @@ async def test_location(event_loop, service: gcs):
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_subscribe(event_loop, service: gcs):
msgid = await service.subscribe()
resp = await service.afbresponse()
@@ -60,7 +58,6 @@ async def test_subscribe(event_loop, service: gcs):
assert event.api == f'{service.api}/location'
-@pytest.mark.regular
async def test_unsubscribe(event_loop, service: gcs):
msgid = await service.unsubscribe()
resp = await service.afbresponse()
diff --git a/pyagl/tests/test_gps.py b/pyagl/tests/test_gps.py
index aeac5cc..71eaa1c 100644
--- a/pyagl/tests/test_gps.py
+++ b/pyagl/tests/test_gps.py
@@ -45,14 +45,12 @@ async def service():
# yield _response
-@pytest.mark.regular
async def test_location_verb(event_loop, service: GPS):
msgid = await service.location()
resp = await service.afbresponse()
assert resp.msgid == msgid
-@pytest.mark.regular
@pytest.mark.xfail(reason='expecting this to fail because of "No 3D GNSS fix" and GPS is unavailable')
async def test_location_result(event_loop, service: GPS):
msgid = await service.location()
@@ -60,7 +58,6 @@ async def test_location_result(event_loop, service: GPS):
assert resp.status == 'success'
-@pytest.mark.regular
async def test_subscribe_verb(event_loop, service: GPS):
msgid = await service.subscribe()
resp = await service.afbresponse()
@@ -68,7 +65,6 @@ async def test_subscribe_verb(event_loop, service: GPS):
assert resp.status == 'success'
-@pytest.mark.regular
@pytest.mark.dependency
async def test_enable_recording(event_loop, service: GPS):
msgid = await service.record()
@@ -76,7 +72,6 @@ async def test_enable_recording(event_loop, service: GPS):
assert resp.status == 'success', resp.info
-@pytest.mark.regular
@pytest.mark.dependency(depends=['test_enable_recording'])
async def test_disable_recording(event_loop, service: GPS):
msgid = await service.record('off')
@@ -85,7 +80,6 @@ async def test_disable_recording(event_loop, service: GPS):
-@pytest.mark.regular
@pytest.mark.dependency
async def test_subscribe_location(event_loop, service: GPS):
msgid = await service.subscribe('location')
@@ -112,7 +106,6 @@ async def test_location_events(event_loop, service: GPS):
pytest.xfail("Did not receive location event")
-@pytest.mark.regular
async def test_unsubscribe(event_loop, service: GPS):
msgid = await service.unsubscribe('location')
resp = await service.afbresponse()
diff --git a/pyagl/tests/test_homescreen.py b/pyagl/tests/test_homescreen.py
index 57e562f..80a7b6c 100644
--- a/pyagl/tests/test_homescreen.py
+++ b/pyagl/tests/test_homescreen.py
@@ -45,13 +45,11 @@ async def service():
# resp = await service.afbresponse()
# assert resp.status == 'success'
-@pytest.mark.regular
async def test_subscribe(event_loop, service: hcs):
msgid = await service.subscribe(event='tap_shortcut')
resp = await service.afbresponse()
assert resp.msgid == msgid
-@pytest.mark.regular
async def test_unsubscribe(event_loop, service: hcs):
msgid = await service.unsubscribe(event='tap_shortcut')
resp = await service.afbresponse()
diff --git a/pyagl/tests/test_mediascanner.py b/pyagl/tests/test_mediascanner.py
index e908d6e..accc4c7 100644
--- a/pyagl/tests/test_mediascanner.py
+++ b/pyagl/tests/test_mediascanner.py
@@ -39,14 +39,12 @@ async def service():
await ns.websocket.close()
-@pytest.mark.regular
async def test_media_result(event_loop, service: mss):
msgid = await service.media_result()
resp = await service.afbresponse()
assert resp.status == 'success'
-@pytest.mark.regular
async def test_subscribe(event_loop, service: mss):
for e in events:
msgid = await service.subscribe(e)
@@ -54,7 +52,6 @@ async def test_subscribe(event_loop, service: mss):
assert resp.status == 'success'
-@pytest.mark.regular
async def test_unsubscribe(event_loop, service: mss):
for e in events:
msgid = await service.unsubscribe(e)
diff --git a/pyagl/tests/test_network.py b/pyagl/tests/test_network.py
index 5a86a2d..ca6d1f5 100644
--- a/pyagl/tests/test_network.py
+++ b/pyagl/tests/test_network.py
@@ -49,7 +49,6 @@ def scannable_interfaces():
scannable = os.environ.get('AGL_SCANNABLE_INTERFACES', 'wifi,bluetooth').split(',')
-@pytest.mark.regular
async def test_state(event_loop, service: NS):
msgid = await service.state()
resp = await service.afbresponse()
@@ -57,7 +56,6 @@ async def test_state(event_loop, service: NS):
# assert resp.data == 'online'
-@pytest.mark.regular
async def test_global_offline(event_loop, service: NS):
addr, _ = service.websocket.remote_address
print(f"Remote address is {addr}")
@@ -67,7 +65,6 @@ async def test_global_offline(event_loop, service: NS):
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_disable_wifi(event_loop, service: NS, expected_available_interfaces):
if 'wifi' not in expected_available_interfaces:
pytest.skip('Skipping disable_technology for "wifi" because it is not expected to be available')
@@ -76,7 +73,6 @@ async def test_disable_wifi(event_loop, service: NS, expected_available_interfac
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_enable_wifi(event_loop, service: NS, expected_available_interfaces):
if 'wifi' not in expected_available_interfaces:
pytest.skip('Skipping enable_technology for "wifi" because it is not expected to be available')
@@ -85,7 +81,6 @@ async def test_enable_wifi(event_loop, service: NS, expected_available_interface
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_enable_bluetooth(event_loop, service: NS, expected_available_interfaces):
if 'bluetooth' not in expected_available_interfaces:
pytest.skip('Skipping enable_technology for "bluetooth" because it is not expected to be available')
@@ -94,7 +89,6 @@ async def test_enable_bluetooth(event_loop, service: NS, expected_available_inte
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_disable_bluetooth(event_loop, service: NS, expected_available_interfaces):
if 'bluetooth' not in expected_available_interfaces:
pytest.skip('Skipping disable_technology for "bluetooth" because it is not expected to be available')
@@ -103,7 +97,6 @@ async def test_disable_bluetooth(event_loop, service: NS, expected_available_int
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_enable_ethernet(event_loop, service: NS, expected_available_interfaces):
if 'ethernet' not in expected_available_interfaces:
pytest.skip('Skipping enable_technology for "ethernet" because it is not expected to be available')
@@ -112,7 +105,6 @@ async def test_enable_ethernet(event_loop, service: NS, expected_available_inter
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_disable_ethernet(event_loop, service: NS, expected_available_interfaces):
addr, _ = service.websocket.remote_address
if addr != 'localhost' or addr != '127.0.0.1':
@@ -126,7 +118,6 @@ async def test_disable_ethernet(event_loop, service: NS, expected_available_inte
assert resp.status == 'success', resp.info
-@pytest.mark.regular
@pytest.mark.dependency(depends=['test_enable_wifi'])
async def test_scan_services(event_loop, service: NS, expected_available_interfaces, scannable_interfaces):
for t in scannable_interfaces:
@@ -136,14 +127,12 @@ async def test_scan_services(event_loop, service: NS, expected_available_interfa
assert resp.status == 'success', f'scan_services failed for technology {t} - {resp.info}'
-@pytest.mark.regular
async def test_global_online(event_loop, service: NS):
msgid = await service.offline(False)
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
@pytest.mark.dependency
async def test_technologies_verb(event_loop, service: NS):
msgid = await service.technologies()
@@ -152,7 +141,6 @@ async def test_technologies_verb(event_loop, service: NS):
assert 'values' in resp.data
-@pytest.mark.regular
@pytest.mark.dependency(depends=['test_technologies_verb'])
async def test_expected_existing_technologies(event_loop, service: NS, expected_available_interfaces):
msgid = await service.technologies()
@@ -162,7 +150,6 @@ async def test_expected_existing_technologies(event_loop, service: NS, expected_
assert t in techs, f'"{t}" technology is expected to be available, but it is not'
-@pytest.mark.regular
@pytest.mark.dependency(depends=['test_expected_existing_technologies'])
async def test_get_property(event_loop, service: NS, expected_available_interfaces):
for t in expected_available_interfaces:
@@ -176,7 +163,6 @@ async def test_get_property(event_loop, service: NS, expected_available_interfac
assert len(diverging_fields) == 0, f'the following property fields are diverging from the expected: {diverging_fields}'
-@pytest.mark.regular
@pytest.mark.dependency
@pytest.mark.xfail(reason='Expecting this to throw "permission denied" via the API, tethering from connmanctl succeeds')
async def test_enable_wifi_tethering(event_loop, service: NS, expected_available_interfaces):
@@ -189,7 +175,6 @@ async def test_enable_wifi_tethering(event_loop, service: NS, expected_available
assert resp.status == 'success', resp.info
-@pytest.mark.regular
@pytest.mark.dependency(depends='test_enable_wifi_tethering')
async def test_disable_wifi_tethering(event_loop, service: NS, expected_available_interfaces):
if 'wifi' not in expected_available_interfaces:
@@ -200,7 +185,6 @@ async def test_disable_wifi_tethering(event_loop, service: NS, expected_availabl
#
-#@pytest.mark.regular
# async def test_set_property(event_loop, service: NS, expected_available_techs):
# for t in expected_available_techs:
# msgid = await service.set_property(t, {'tethering': True})
@@ -209,7 +193,6 @@ async def test_disable_wifi_tethering(event_loop, service: NS, expected_availabl
# print(resp)
-@pytest.mark.regular
async def test_services_verb(event_loop, service: NS):
msgid = await service.services()
resp = await service.afbresponse()
@@ -217,84 +200,72 @@ async def test_services_verb(event_loop, service: NS):
assert 'values' in resp.data
-@pytest.mark.regular
async def test_subscribe_global_state(event_loop, service: NS):
msgid = await service.subscribe('global_state')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_unsubscribe_global_state(event_loop, service: NS):
msgid = await service.unsubscribe('global_state')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_subscribe_technologies(event_loop, service: NS):
msgid = await service.subscribe('technologies')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_unsubscribe_technologies(event_loop, service: NS):
msgid = await service.unsubscribe('technologies')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_subscribe_tech_props(event_loop, service: NS):
msgid = await service.subscribe('technology_properties')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_unsubscribe_tech_props(event_loop, service: NS):
msgid = await service.unsubscribe('technology_properties')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_subscribe_services(event_loop, service: NS):
msgid = await service.subscribe('services')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_unsubscribe_services(event_loop, service: NS):
msgid = await service.unsubscribe('services')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_subscribe_service_props(event_loop, service: NS):
msgid = await service.subscribe('service_properties')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_unsubscribe_service_props(event_loop, service: NS):
msgid = await service.unsubscribe('service_properties')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_subscribe_agent(event_loop, service: NS):
msgid = await service.subscribe('agent')
resp = await service.afbresponse()
assert resp.status == 'success', resp.info
-@pytest.mark.regular
async def test_unsubscribe_agent(event_loop, service: NS):
msgid = await service.unsubscribe('agent')
resp = await service.afbresponse()
diff --git a/pyagl/tests/test_nfc.py b/pyagl/tests/test_nfc.py
index e1df2fe..7d6d5af 100644
--- a/pyagl/tests/test_nfc.py
+++ b/pyagl/tests/test_nfc.py
@@ -40,14 +40,12 @@ async def service():
await svc.websocket.close()
-@pytest.mark.regular
async def subscribe(event_loop, service: nfcs):
msgid = service.subscribe()
resp = await service.afbresponse()
assert resp.msgid == msgid
-@pytest.mark.regular
async def unsubscribe(event_loop, service: nfcs):
msgid = service.unsubscribe()
resp = await service.afbresponse()
diff --git a/pyagl/tests/test_signal_composer.py b/pyagl/tests/test_signal_composer.py
index bdb8edd..dfc002b 100644
--- a/pyagl/tests/test_signal_composer.py
+++ b/pyagl/tests/test_signal_composer.py
@@ -40,7 +40,6 @@ async def service():
await ns.websocket.close()
-@pytest.mark.regular
@pytest.mark.dependency
async def test_list(event_loop, service: scs):
msgid = await service.list()
@@ -49,14 +48,13 @@ async def test_list(event_loop, service: scs):
assert resp.status == 'success'
-@pytest.mark.regular
async def test_getNoFilter(event_loop, service: scs):
msgid = await service.get({'signal': 'fuel_level'})
resp = await service.afbresponse()
assert resp is not None, f'.get() timed out'
assert resp.status == 'success'
-@pytest.mark.regular
+
@pytest.mark.dependency(depends=['test_list'])
@pytest.mark.xfail(reason='on first boot enumerating through all signals causes the service to crash, restarting it fixes it')
async def test_getAllSignals(event_loop, service: scs):
@@ -69,7 +67,6 @@ async def test_getAllSignals(event_loop, service: scs):
assert resp.status == 'success', f'get() with signal {s} failed, info: {resp.info}'
# while rewriting the old lua tests this one tries to 'get' 'odometer' signal but its not currently present
-# @pytest.mark.regular
# async def test_getFilterAvg(event_loop, service: scs):
# msgid = await service.get({'signal': 'odometer', 'options': {'average': 10}})
# resp = await service.afbresponse()
@@ -77,7 +74,6 @@ async def test_getAllSignals(event_loop, service: scs):
# assert resp.status == 'success'
-@pytest.mark.regular
async def test_getFilterMin(event_loop, service: scs):
msgid = await service.get({'signal': 'latitude', 'options': {'minimum': 10}})
resp = await service.afbresponse()
@@ -85,7 +81,6 @@ async def test_getFilterMin(event_loop, service: scs):
assert resp.status == 'success'
-@pytest.mark.regular
async def test_getFilterMax(event_loop, service: scs):
msgid = await service.get({'signal': 'vehicle_speed', 'options': {'maximum': 10}})
resp = await service.afbresponse()
@@ -93,7 +88,6 @@ async def test_getFilterMax(event_loop, service: scs):
assert resp.status == 'success'
-@pytest.mark.regular
async def test_subscribe(event_loop, service: scs):
msgid = await service.subscribe({'service': 'longitude'})
resp = await service.afbresponse()
@@ -101,11 +95,8 @@ async def test_subscribe(event_loop, service: scs):
assert resp.status == 'success'
-@pytest.mark.regular
async def test_unsubscribe(event_loop, service: scs):
msgid = await service.unsubscribe({'service': 'longitude'})
resp = await service.afbresponse()
resp is not None, ".unsubscribe() timed out with {'service': 'longitude'}"
assert resp.status == 'success'
-
-
diff --git a/pyagl/tests/test_weather.py b/pyagl/tests/test_weather.py
index c106492..3643bf5 100644
--- a/pyagl/tests/test_weather.py
+++ b/pyagl/tests/test_weather.py
@@ -21,7 +21,7 @@ import logging
from pyagl.services.base import AFBResponse, AFBT
from pyagl.services.weather import WeatherService as ws
-pytestmark = [pytest.mark.asyncio, pytest.mark.weather, pytest.mark.regular]
+pytestmark = [pytest.mark.asyncio, pytest.mark.weather]
@pytest.fixture(scope='module')