From 8d99444c6a541cb04d3ce7a9846a2dafdcf843ec Mon Sep 17 00:00:00 2001 From: holger krekel Date: Tue, 16 Jul 2019 00:22:12 +0200 Subject: [PATCH] fix std --- python/src/deltachat/__init__.py | 2 +- python/tests/test_lowlevel.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/src/deltachat/__init__.py b/python/src/deltachat/__init__.py index 83652d344..e5612b827 100644 --- a/python/src/deltachat/__init__.py +++ b/python/src/deltachat/__init__.py @@ -45,7 +45,7 @@ def py_dc_callback(ctx, evt, data1, data2): ret = callback(ctx, evt_name, data1, data2) if ret is None: ret = 0 - assert isinstance(ret, int), repr(res) + assert isinstance(ret, int), repr(ret) if event_sig_types & 4: return ffi.cast('uintptr_t', ret) elif event_sig_types & 8: diff --git a/python/tests/test_lowlevel.py b/python/tests/test_lowlevel.py index 484a61795..dee19928e 100644 --- a/python/tests/test_lowlevel.py +++ b/python/tests/test_lowlevel.py @@ -2,7 +2,6 @@ from __future__ import print_function import pytest from deltachat import capi, Account, const, set_context_callback from deltachat.capi import ffi -from deltachat.cutil import as_dc_charpointer 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) capi.lib.dc_close(ctx) + def test_dc_close_events(): ctx = capi.lib.dc_context_new(capi.lib.py_dc_callback, ffi.NULL, ffi.NULL) evlog = EventLogger(ctx)