From 880071b161a556a3df56bc44c66b391bcdbbe5d7 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Sun, 10 Jun 2018 12:22:28 +0200 Subject: [PATCH] Add proof-of-concept unittest Doesn't do anything useful yet. --- .gitignore | 4 ++++ python/tests/test_mrmailbox.py | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 python/tests/test_mrmailbox.py diff --git a/.gitignore b/.gitignore index 76074539..669f1a69 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,10 @@ *.o .deps .dirstamp +.eggs +__pycache__ +.pytest_cache +*.egg-info # ignore Codeblocks temporary files and build directories. # Codeblocks project file (*.cbp) is added although it may contain some user preferences (eg. program's arguments), it may be useful for some people diff --git a/python/tests/test_mrmailbox.py b/python/tests/test_mrmailbox.py new file mode 100644 index 00000000..1978094d --- /dev/null +++ b/python/tests/test_mrmailbox.py @@ -0,0 +1,16 @@ +import pathlib + +import pytest + +from deltachat import capi + + +@pytest.fixture +def tmppath(tmpdir): + return pathlib.Path(tmpdir.strpath) + + +def test_new(): + mbox = capi.lib.mrmailbox_new(capi.ffi.NULL, capi.ffi.NULL, capi.ffi.NULL) + capi.lib.mrmailbox_close(mbox) + assert 0