Skip to content

Commit

Permalink
fix: use actual Mock objects fo test setup
Browse files Browse the repository at this point in the history
Newer Python runtimes do more stringent method signature checking,
so use an actual Mock for dummy tasks rather than a "random" callable

Partial fix for Issue NicolasLM#29
  • Loading branch information
nisimond committed Feb 28, 2024
1 parent 95b860c commit 330fde6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_schedule_at(patch_now):
now = get_now()

tasks = Tasks()
tasks.add(print, 'bar_task')
tasks.add(Mock(), 'bar_task')

broker = Mock()

Expand Down Expand Up @@ -91,8 +91,8 @@ def test_schedule_batch(patch_now):
now = get_now()

tasks = Tasks()
tasks.add(print, 'foo_task')
tasks.add(print, 'bar_task')
tasks.add(Mock(), 'foo_task')
tasks.add(Mock(), 'bar_task')

broker = Mock()

Expand Down

0 comments on commit 330fde6

Please sign in to comment.