Hi mbeko (?),
On Fri, Mar 29, 2019 at 23:55 -0000, deltachatmailinglist(a)netc.fr wrote:
I have added a new feature to Delta Chat core, namely
the [detection and removal of subject prefixes]. I prefer to have unit tests early during
the development and I didn't find any existing ones in the repository. So I used
[MinUnit] as a basis to quickly set up a C test framework and wrote my tests with that.
In the meantime, I have asked around and have been pointed to the Python tests where
I've been told that the C methods would automatically be available via
I ported my tests to Python, but they don't work because I can only access the
existing C methods, not my added ones. I think it's because I followed the Readme
which instructs to install the bindings via Pip so they can't possibly contain my
code. But also when I analyse the symbols in the generated
`python/src/deltachat/capi.*.so` files, my methods are missing.
I should note that I added my new files to the Ninja build, the methods are contained in
the compiled `build/src/libdeltachat.so` and I called `sudo ninja install` as mentioned in
My two questions therefore are:
1. How to make the compiled `capi*.so` files reflect the current C code in the
the python module "deltachat.capi.lib" only contains those methods that
are defined in deltachat.h. No other headers are considered. That limits
what you can test through the current python-toolchain to the public API.
So I think it's fine if you try to integrate your tests with what
is run with "ninja test".
2. How to use these bindings in the tests?
We'd need to add some mechanism/namespace and try expose other than
deltachat.h functionality. Not around the corner.
> [detection and removal of subject prefixes]:
> delta mailing list -- delta(a)codespeak.net
> To unsubscribe send an email to delta-leave(a)codespeak.net