Commit 3a50393c by Toshio Kuratomi

Merge pull request #12269 from mgedmin/py3k

Python 3: fix TypeError: unorderable types in test
parents 1f4c65ab c22f4ee6
......@@ -220,6 +220,11 @@ class TestTaskExecutor(unittest.TestCase):
mock_task.changed_when = None
mock_task.failed_when = None
mock_task.post_validate.return_value = None
# mock_task.async cannot be left unset, because on Python 3 MagicMock()
# > 0 raises a TypeError There are two reasons for using the value 1
# here: on Python 2 comparing MagicMock() > 0 returns True, and the
# other reason is that if I specify 0 here, the test fails. ;)
mock_task.async = 1
mock_play_context = MagicMock()
mock_play_context.post_validate.return_value = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment