File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,8 +158,8 @@ def main(
158158 "-d" ,
159159 "--allow-duplicates" ,
160160 help = "Whether to allow duplicate timestamps in the sensor data. "
161- "If this flag is set, no error will be raised during Measurement validation and "
162- "processing can continue. Only unique timestamps and their corresponding "
161+ "If this flag is set, no error will be raised during Measurement validation "
162+ "and processing can continue. Only unique timestamps and their corresponding "
163163 "sensor values will be kept. "
164164 "The first occurrence of each timestamp is retained. Defaults to False. "
165165 "Note that the presence of duplicate timestamps may indicate sensor "
Original file line number Diff line number Diff line change 66import actfast
77import numpy as np
88import pytest
9+ import pytest_mock
910
1011from wristpy .core import models
1112from wristpy .io .readers import readers
@@ -145,13 +146,14 @@ def test_timezone_extraction_bin(sample_data_bin: pathlib.Path) -> None:
145146 ],
146147)
147148def test_allow_duplicates_option (
148- mocker : pytest . MonkeyPatch , file_type : str , mock_data : dict
149+ mocker : pytest_mock . MockFixture , file_type : str , mock_data : dict
149150) -> None :
150151 """Test the allow_duplicates option in read_watch_data function."""
151152 mocker .patch ("actfast.read" , return_value = mock_data )
152153
153154 watch_data = readers .read_watch_data (f"dummy{ file_type } " , allow_duplicates = True )
154155
156+ assert watch_data .lux is not None
155157 assert len (watch_data .acceleration .time ) == 2
156158 assert len (watch_data .lux .time ) == 2
157159 assert np .array_equal (
You can’t perform that action at this time.
0 commit comments