mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 05:56:31 +03:00
add some logging, and a more precise teardown for online python tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from __future__ import print_function
|
||||
import pytest
|
||||
from deltachat import capi, Account, const, set_context_callback
|
||||
from deltachat import capi, Account, const, set_context_callback, clear_context_callback
|
||||
from deltachat.capi import ffi
|
||||
from deltachat.account import EventLogger
|
||||
|
||||
@@ -10,6 +10,13 @@ def test_empty_context():
|
||||
capi.lib.dc_close(ctx)
|
||||
|
||||
|
||||
def test_callback_None2int():
|
||||
ctx = capi.lib.dc_context_new(capi.lib.py_dc_callback, ffi.NULL, ffi.NULL)
|
||||
set_context_callback(ctx, lambda *args: None)
|
||||
capi.lib.dc_close(ctx)
|
||||
clear_context_callback(ctx)
|
||||
|
||||
|
||||
def test_dc_close_events():
|
||||
ctx = capi.lib.dc_context_new(capi.lib.py_dc_callback, ffi.NULL, ffi.NULL)
|
||||
evlog = EventLogger(ctx)
|
||||
|
||||
Reference in New Issue
Block a user