Re: [PATCH 2/2] test: pytest runner for the test suite

2018-04-13 Thread Floris Bruynooghe
On Sun 08 Apr 2018 at 19:14 -0300, David Bremner wrote:

> Floris Bruynooghe  writes:
>
>> This series looks good to me, would be great to have!  Do you want to
>> commit them this or should I just incorporate it and submit together
>> with tests once actual tests exist.  You could always commit with a ``def
>> test_dummy(): assert True`` or something if you like.
>>
>
> For now, why don't you just incorporate them. Maybe you'll discover some
> issues with them as you work up some real tests.

Sure, that works.

> BTW, it seems like a
> reasonable plan to get a set of unit tests for the existing bindings
> first to help with migration. Is that what you had in mind?

Yes that's what I had in mind.  To safely swap out ctypes for cffi
adding tests to ensure the existing API behaviour remains is a must.

Which reminds me that it's probably worth calling this out explicitly
again: this works implies that cffi will become an external dependency
[0] for the existing bindings.  Just want to make sure this doesn't
become an issue further down the line.

Cheers,
Floris

[0] Technically only on cpython, it's bundled with pypy.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 2/2] test: pytest runner for the test suite

2018-04-10 Thread Tomi Ollila
On Sun, Apr 08 2018, Floris Bruynooghe wrote:

> This series looks good to me, would be great to have!  Do you want to
> commit them this or should I just incorporate it and submit together
> with tests once actual tests exist.  You could always commit with a ``def
> test_dummy(): assert True`` or something if you like.

I'd say incorporate and submit, have some real tests, remove that
*known_broken* line and so on...

Tomi


>
> Thanks!
> Floris
>
>
> On Sat 07 Apr 2018 at 18:39 -0300, David Bremner wrote:
>
>> The 'test_subtest_known_broken' should be removed when there are
>> actual tests to run.
>>
>> Based on a function from Tomi [1]
>>
>> [1]: id:m2r2nq23r9@guru.guru-group.fi
>> ---
>>  test/T391-pytest.sh | 14 ++
>>  1 file changed, 14 insertions(+)
>>  create mode 100755 test/T391-pytest.sh
>>
>> diff --git a/test/T391-pytest.sh b/test/T391-pytest.sh
>> new file mode 100755
>> index ..9ac7aabe
>> --- /dev/null
>> +++ b/test/T391-pytest.sh
>> @@ -0,0 +1,14 @@
>> +#!/usr/bin/env bash
>> +test_description="python bindings (pytest)"
>> +. $(dirname "$0")/test-lib.sh || exit 1
>> +
>> +test_require_external_prereq ${NOTMUCH_PYTHON}
>> +
>> +for bin in ${NOTMUCH_PYTEST_PYTHONS}; do
>> +test_begin_subtest "pytest ($bin)"
>> +  test_subtest_known_broken
>> +   
>> PYTHONPATH="$NOTMUCH_SRCDIR/bindings/python${PYTHONPATH:+:$PYTHONPATH}" \
>> + test_expect_success "$bin -m pytest 
>> $NOTMUCH_SRCDIR/bindings/python"
>> +done
>> +
>> +test_done
> ___
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 2/2] test: pytest runner for the test suite

2018-04-08 Thread Floris Bruynooghe
This series looks good to me, would be great to have!  Do you want to
commit them this or should I just incorporate it and submit together
with tests once actual tests exist.  You could always commit with a ``def
test_dummy(): assert True`` or something if you like.

Thanks!
Floris


On Sat 07 Apr 2018 at 18:39 -0300, David Bremner wrote:

> The 'test_subtest_known_broken' should be removed when there are
> actual tests to run.
>
> Based on a function from Tomi [1]
>
> [1]: id:m2r2nq23r9@guru.guru-group.fi
> ---
>  test/T391-pytest.sh | 14 ++
>  1 file changed, 14 insertions(+)
>  create mode 100755 test/T391-pytest.sh
>
> diff --git a/test/T391-pytest.sh b/test/T391-pytest.sh
> new file mode 100755
> index ..9ac7aabe
> --- /dev/null
> +++ b/test/T391-pytest.sh
> @@ -0,0 +1,14 @@
> +#!/usr/bin/env bash
> +test_description="python bindings (pytest)"
> +. $(dirname "$0")/test-lib.sh || exit 1
> +
> +test_require_external_prereq ${NOTMUCH_PYTHON}
> +
> +for bin in ${NOTMUCH_PYTEST_PYTHONS}; do
> +test_begin_subtest "pytest ($bin)"
> +  test_subtest_known_broken
> +   
> PYTHONPATH="$NOTMUCH_SRCDIR/bindings/python${PYTHONPATH:+:$PYTHONPATH}" \
> + test_expect_success "$bin -m pytest 
> $NOTMUCH_SRCDIR/bindings/python"
> +done
> +
> +test_done
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 2/2] test: pytest runner for the test suite

2018-04-07 Thread David Bremner
The 'test_subtest_known_broken' should be removed when there are
actual tests to run.

Based on a function from Tomi [1]

[1]: id:m2r2nq23r9@guru.guru-group.fi
---
 test/T391-pytest.sh | 14 ++
 1 file changed, 14 insertions(+)
 create mode 100755 test/T391-pytest.sh

diff --git a/test/T391-pytest.sh b/test/T391-pytest.sh
new file mode 100755
index ..9ac7aabe
--- /dev/null
+++ b/test/T391-pytest.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+test_description="python bindings (pytest)"
+. $(dirname "$0")/test-lib.sh || exit 1
+
+test_require_external_prereq ${NOTMUCH_PYTHON}
+
+for bin in ${NOTMUCH_PYTEST_PYTHONS}; do
+test_begin_subtest "pytest ($bin)"
+  test_subtest_known_broken
+   PYTHONPATH="$NOTMUCH_SRCDIR/bindings/python${PYTHONPATH:+:$PYTHONPATH}" 
\
+ test_expect_success "$bin -m pytest 
$NOTMUCH_SRCDIR/bindings/python"
+done
+
+test_done
-- 
2.16.3

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch