Skip to content

Commit

Permalink
Remove caplog
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed May 14, 2024
1 parent 5e47ebb commit 798a4ed
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/test_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def create_data_file(path):
fd.write("data")


def test_run_selector_on_single_file_messages(tmp_path, caplog):
def test_run_selector_on_single_file_messages(tmp_path):
"""Test running the selector on single file messages."""
uid = "IVCDB_j02_d20240419_t1114110_e1115356_b07465_c20240419113435035578_cspp_dev.h5"
sdr_file = tmp_path / "sdr" / uid
Expand Down Expand Up @@ -126,18 +126,13 @@ def test_run_selector_on_single_file_messages(tmp_path, caplog):

selector_config = dict(ttl=1, host="localhost", port=6309)

caplog.set_level("INFO")
with patched_subscriber_recv(messages):
with patched_publisher() as published_messages:
with _running_redis_server(port=6309):
_run_selector_with_managed_dict_server(selector_config, subscriber_config, publisher_config)
assert len(published_messages) == 2
assert published_messages[0] == msg1
assert published_messages[1] == msg3
assert "New content " + str(msg1) in caplog.text
assert "Discarded " + str(msg2) in caplog.text
assert "New content " + str(msg3) in caplog.text



@pytest.mark.usefixtures("_redis_server")
Expand Down

0 comments on commit 798a4ed

Please sign in to comment.