Skip to content

Commit 330fde6

Browse files
committed
fix: use actual Mock objects fo test setup
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
1 parent 95b860c commit 330fde6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_engine.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_schedule_at(patch_now):
4949
now = get_now()
5050

5151
tasks = Tasks()
52-
tasks.add(print, 'bar_task')
52+
tasks.add(Mock(), 'bar_task')
5353

5454
broker = Mock()
5555

@@ -91,8 +91,8 @@ def test_schedule_batch(patch_now):
9191
now = get_now()
9292

9393
tasks = Tasks()
94-
tasks.add(print, 'foo_task')
95-
tasks.add(print, 'bar_task')
94+
tasks.add(Mock(), 'foo_task')
95+
tasks.add(Mock(), 'bar_task')
9696

9797
broker = Mock()
9898

0 commit comments

Comments
 (0)