Skip to content

Commit

Permalink
tests: fixup paths to dramatiq.threading
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdanp committed Apr 2, 2023
1 parent 1d10f28 commit c251564
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest

from dramatiq import Worker
from dramatiq.middleware.threading import is_gevent_active
from dramatiq.threading import is_gevent_active


@contextmanager
Expand Down
6 changes: 3 additions & 3 deletions tests/middleware/test_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pytest

from dramatiq.middleware import threading
from dramatiq import threading

not_supported = threading.current_platform not in threading.supported_platforms

Expand Down Expand Up @@ -46,7 +46,7 @@ def test_raise_thread_exception_on_nonexistent_thread(caplog):
# I expect a 'failed to set exception' critical message to be logged
expected_message = "Failed to set exception (Interrupt) in thread %d." % thread_id
assert caplog.record_tuples == [
("dramatiq.middleware.threading", logging.CRITICAL, expected_message),
("dramatiq.threading", logging.CRITICAL, expected_message),
]


Expand All @@ -59,7 +59,7 @@ def test_raise_thread_exception_unsupported_platform(caplog, monkeypatch):

# I expect a 'platform not supported' critical message to be logged
assert caplog.record_tuples == [
("dramatiq.middleware.threading", logging.CRITICAL, (
("dramatiq.threading", logging.CRITICAL, (
"Setting thread exceptions (Interrupt) is not supported "
"for your current platform ('not supported')."
)),
Expand Down

0 comments on commit c251564

Please sign in to comment.