We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4d4972 commit 2cb8260Copy full SHA for 2cb8260
tests/test_tasks_thread.py
@@ -97,19 +97,16 @@ def test_task_log_list():
97
def task_func():
98
logging.warning("Task warning")
99
for i in range(10):
100
- time.sleep(0.001)
101
logging.info(f"Counted to {i}")
102
103
task_obj = thread.ActionThread(target=task_func)
104
task_obj.start()
105
task_obj.started.wait()
106
107
- assert len(task_obj.log) >= 1
+ task_obj.join()
108
assert task_obj.log[0]["message"] == "Task warning"
109
assert task_obj.log[0]["levelname"] == "WARNING"
110
assert task_obj.log[0]["filename"] == os.path.basename(__file__)
111
-
112
- task_obj.join()
113
assert (
114
len(task_obj.log) == 11
115
), "Didn't get the right number of log entries - are INFO entries being logged?"
0 commit comments