mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 13:36:30 +03:00
add a failing test taht doesn't use pytest anymore
This commit is contained in:
30
python/fail_test.py
Normal file
30
python/fail_test.py
Normal file
@@ -0,0 +1,30 @@
|
||||
from __future__ import print_function
|
||||
import threading
|
||||
from deltachat import capi, cutil, const, set_context_callback, clear_context_callback
|
||||
from deltachat.capi import ffi
|
||||
from deltachat.capi import lib
|
||||
from deltachat.account import EventLogger
|
||||
|
||||
|
||||
class EventThread(threading.Thread):
|
||||
def __init__(self, dc_context):
|
||||
self.dc_context = dc_context
|
||||
super(EventThread, self).__init__()
|
||||
self.setDaemon(1)
|
||||
|
||||
def run(self):
|
||||
lib.dc_context_run(self.dc_context, lib.py_dc_callback)
|
||||
|
||||
def stop(self):
|
||||
lib.dc_context_shutdown(self.dc_context)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("1")
|
||||
ctx = capi.lib.dc_context_new(ffi.NULL, ffi.NULL)
|
||||
print("2")
|
||||
ev_thread = EventThread(ctx)
|
||||
print("3 -- starting event thread")
|
||||
ev_thread.start()
|
||||
print("4 -- stopping event thread")
|
||||
ev_thread.stop()
|
||||
Reference in New Issue
Block a user