From 5e40362fd157cd8db62d972251a53b683a1c2fc2 Mon Sep 17 00:00:00 2001 From: Mathis Hocke <mathis.hocke@fu-berlin.de> Date: Tue, 25 May 2021 15:22:58 +0200 Subject: [PATCH] Fix #10: Remove incorrect error logging --- src/robofish/io/file.py | 2 -- tests/robofish/io/test_file.py | 9 --------- 2 files changed, 11 deletions(-) diff --git a/src/robofish/io/file.py b/src/robofish/io/file.py index 5d5742f..4ee6a6a 100644 --- a/src/robofish/io/file.py +++ b/src/robofish/io/file.py @@ -207,8 +207,6 @@ class File(h5py.File): calendar_time_points: Iterable = None, default: bool = False, ): - if frequency_hz is not None and monotonic_time_points_us is not None: - logging.exception("Specify either frequency_hz or timestamps, not both.") # Find Name for sampling if none is given if name is None: diff --git a/tests/robofish/io/test_file.py b/tests/robofish/io/test_file.py index 31b3bda..c7b6f1a 100644 --- a/tests/robofish/io/test_file.py +++ b/tests/robofish/io/test_file.py @@ -148,15 +148,6 @@ def test_speeds_turns_angles(): assert (f.entity_speeds_turns == 0).all() -def test_broken_sampling(caplog): - sf = robofish.io.File(world_size_cm=[10, 10]) - caplog.set_level(logging.ERROR) - broken_sampling = sf.create_sampling( - name="broken sampling", frequency_hz=25, monotonic_time_points_us=np.ones((100)) - ) - assert "ERROR" in caplog.text - - def test_deprecated_get_poses(): f = test_multiple_entities() with pytest.warns(DeprecationWarning): -- GitLab