mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 22:46:29 +03:00
fix std
This commit is contained in:
@@ -45,7 +45,7 @@ def py_dc_callback(ctx, evt, data1, data2):
|
|||||||
ret = callback(ctx, evt_name, data1, data2)
|
ret = callback(ctx, evt_name, data1, data2)
|
||||||
if ret is None:
|
if ret is None:
|
||||||
ret = 0
|
ret = 0
|
||||||
assert isinstance(ret, int), repr(res)
|
assert isinstance(ret, int), repr(ret)
|
||||||
if event_sig_types & 4:
|
if event_sig_types & 4:
|
||||||
return ffi.cast('uintptr_t', ret)
|
return ffi.cast('uintptr_t', ret)
|
||||||
elif event_sig_types & 8:
|
elif event_sig_types & 8:
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from __future__ import print_function
|
|||||||
import pytest
|
import pytest
|
||||||
from deltachat import capi, Account, const, set_context_callback
|
from deltachat import capi, Account, const, set_context_callback
|
||||||
from deltachat.capi import ffi
|
from deltachat.capi import ffi
|
||||||
from deltachat.cutil import as_dc_charpointer
|
|
||||||
from deltachat.account import EventLogger
|
from deltachat.account import EventLogger
|
||||||
|
|
||||||
|
|
||||||
@@ -10,6 +9,7 @@ def test_empty_context():
|
|||||||
ctx = capi.lib.dc_context_new(capi.ffi.NULL, capi.ffi.NULL, capi.ffi.NULL)
|
ctx = capi.lib.dc_context_new(capi.ffi.NULL, capi.ffi.NULL, capi.ffi.NULL)
|
||||||
capi.lib.dc_close(ctx)
|
capi.lib.dc_close(ctx)
|
||||||
|
|
||||||
|
|
||||||
def test_dc_close_events():
|
def test_dc_close_events():
|
||||||
ctx = capi.lib.dc_context_new(capi.lib.py_dc_callback, ffi.NULL, ffi.NULL)
|
ctx = capi.lib.dc_context_new(capi.lib.py_dc_callback, ffi.NULL, ffi.NULL)
|
||||||
evlog = EventLogger(ctx)
|
evlog = EventLogger(ctx)
|
||||||
|
|||||||
Reference in New Issue
Block a user