Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions msgq/tests/test_fake.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ def set_event_run(endpoint, identifier):
handle.recv_called_event.set()


def daemon_repub_process_run():
def daemon_repub_process_run(prefix: Optional[str] = None):
# Re-apply fake config in the child. Python 3.14+ defaults to forkserver on
# Linux, which does not inherit setenv() calls from the parent.
msgq.toggle_fake_events(True)
if prefix is not None:
msgq.set_fake_prefix(prefix)
else:
msgq.delete_fake_prefix()

pub_sock = msgq.pub_sock("ubloxGnss")
sub_sock = msgq.sub_sock("carState")

Expand Down Expand Up @@ -164,7 +172,7 @@ def test_synced_pub_sub(self):

pub_sock = msgq.pub_sock("carState")

p = multiprocessing.Process(target=daemon_repub_process_run)
p = multiprocessing.Process(target=daemon_repub_process_run, args=(self.prefix,))
p.start()

sub_sock = msgq.sub_sock("ubloxGnss")
Expand Down Expand Up @@ -193,3 +201,4 @@ def test_synced_pub_sub(self):
self.fail("event.wait() timed out")
finally:
p.kill()
p.join()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "msgq"
version = "0.0.1"
description = "Lock-free IPC pub/sub message queue"
readme = "README.md"
requires-python = ">=3.11,<3.13"
requires-python = ">=3.11"
license = {text = "MIT"}
authors = [{name = "comma.ai"}]
classifiers = [
Expand Down
Loading