Skip to content

Commit

Permalink
no asyncio scheuler
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-usielski committed Dec 2, 2024
1 parent e67e9ac commit fbde7d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion test/cmd/unix/test_cmd_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_cat_raise_timeout_exception(buffer_connection, command_output_timeout_e
else:
msg = f"No exception for {timeout}, ref = {cat_cmd.result()}"
raise Exception(msg)
timeout /= 8.
timeout /= 32.


def test_cat_prompt_in_the_same_line(buffer_connection, command_output_prompt_in_the_same_line):
Expand Down
24 changes: 12 additions & 12 deletions test/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,18 @@ def test_thread_test_job():
assert (3 == values['number'])


@pytest.mark.skipif(sys.version_info < (3, 4), reason="requires python3.4 or higher")
def test_asyncio_test_job():
loop = asyncio.get_event_loop()
Scheduler.change_kind("asyncio")
values = {'number': 0}
job = Scheduler.get_job(callback=callback, interval=0.1, callback_params={'param_dict': values})
job.start()
loop.run_until_complete(asyncio.sleep(0.23))
job.cancel()
loop.stop()
Scheduler.change_kind() # Set the default
assert (2 == values['number'])
# @pytest.mark.skipif(sys.version_info < (3, 4), reason="requires python3.4 or higher")
# def test_asyncio_test_job():
# loop = asyncio.get_event_loop()
# Scheduler.change_kind("asyncio")
# values = {'number': 0}
# job = Scheduler.get_job(callback=callback, interval=0.1, callback_params={'param_dict': values})
# job.start()
# loop.run_until_complete(asyncio.sleep(0.23))
# job.cancel()
# loop.stop()
# Scheduler.change_kind() # Set the default
# assert (2 == values['number'])


def test_cannot_create_more_objects():
Expand Down

0 comments on commit fbde7d7

Please sign in to comment.