Skip to content

Commit 0086742

Browse files
committed
tests: Rename test to better reflect its purpose
The test_location.py test was renamed to test_sampling.py to better reflect its purpose. Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
1 parent 1060c38 commit 0086742

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

tests/on_target/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Run desired tests, example commands
4848
```shell
4949
pytest -s -v -m "not slow" tests
5050
pytest -s -v -m "not slow" tests/test_functional/test_uart_output.py
51-
pytest -s -v -m "not slow" tests/test_functional/test_location.py::test_wifi_location
51+
pytest -s -v -m "not slow" tests/test_functional/test_sampling.py
5252
pytest -s -v -m "slow" tests/test_functional/test_fota.py::test_full_mfw_fota
5353
```
5454

tests/on_target/tests/test_functional/test_location.py tests/on_target/tests/test_functional/test_sampling.py

+1-17
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,7 @@
1414

1515
logger = get_logger()
1616

17-
def test_wifi_location(t91x_board, hex_file):
18-
'''
19-
Test that the device can get location using Wi-Fi
20-
'''
21-
run_location(t91x_board, hex_file, location_method="Wi-Fi")
22-
23-
@pytest.mark.skip(reason="GNSS location is not supported on this device")
24-
def test_gnss_location(t91x_board, hex_file):
25-
'''
26-
Test that the device can get location using GNSS
27-
'''
28-
run_location(t91x_board, hex_file, location_method="GNSS")
29-
30-
def run_location(t91x_board, hex_file, location_method):
17+
def test_sampling(t91x_board, hex_file):
3118
flash_device(os.path.abspath(hex_file))
3219
t91x_board.uart.xfactoryreset()
3320
patterns_cloud_connection = [
@@ -64,6 +51,3 @@ def run_location(t91x_board, hex_file, location_method):
6451
assert values
6552
lat, lon, acc, method = values
6653
assert abs(float(lat) - 61.5) < 2 and abs(float(lon) - 10.5) < 1
67-
method = int(method)
68-
expected_method = 4 if location_method == "Wi-Fi" else 1
69-
assert method == expected_method

0 commit comments

Comments
 (0)