[capi-sig]Re: New pythoncapi GitHub organization and creation of a test suite for the Python C API
On 2018-09-03 20:50, Brett Cannon wrote:
The worry of unintended issues due to Cython happening to use an C API that's actually under test seems like a reasonable worry.
We're using Python scripts and Python classes to run the standard Python test suite and nobody seems to find that a problem...
The standard python test suite except the test_capi test (which some caveats) can therefore be considered integration testing. I think the worry for such possible interface is legitimate and proper c-level unit tests are something that will help keeping both layers separated. If not, we always would be testing a particular subset of the C-API **and** its interaction with PyObject_Call and friends.
As a possible (unlikely but posible) example, it could be that the PyObject_Call that wraps the tested function modifies the state of some internal cache, interned objects or some global state and the tested function behaviour changes, which is non ideal.
Also, the fact that we are doing it this way does not prove that is not something we can improve now that we are precisely thinking how to improve the c-api, which includes testing and stability.
On Mon, 3 Sep 2018, 20:17 Jeroen Demeyer, <J.Demeyer@ugent.be> wrote:
On 2018-09-03 20:50, Brett Cannon wrote:
The worry of unintended issues due to Cython happening to use an C API that's actually under test seems like a reasonable worry.
We're using Python scripts and Python classes to run the standard Python test suite and nobody seems to find that a problem...
capi-sig mailing list -- capi-sig@python.org To unsubscribe send an email to capi-sig-leave@python.org
I'm afraid this disagreement is technically endless. To help settle this why don't we try writing tests without Cython to show how us core devs want the tests to behave and then those promoting Cython can convert them and show us how it would work and how out worries of using the API under test by Cython isn't a worry? Otherwise this will continue to be a subjective argument between test isolation versus test writing productivity
On Mon., Sep. 3, 2018, 12:30 Pablo Galindo Salgado, <pablogsal@gmail.com> wrote:
The standard python test suite except the test_capi test (which some caveats) can therefore be considered integration testing. I think the worry for such possible interface is legitimate and proper c-level unit tests are something that will help keeping both layers separated. If not, we always would be testing a particular subset of the C-API **and** its interaction with PyObject_Call and friends.
As a possible (unlikely but posible) example, it could be that the PyObject_Call that wraps the tested function modifies the state of some internal cache, interned objects or some global state and the tested function behaviour changes, which is non ideal.
Also, the fact that we are doing it this way does not prove that is not something we can improve now that we are precisely thinking how to improve the c-api, which includes testing and stability.
On Mon, 3 Sep 2018, 20:17 Jeroen Demeyer, <J.Demeyer@ugent.be> wrote:
On 2018-09-03 20:50, Brett Cannon wrote:
The worry of unintended issues due to Cython happening to use an C API that's actually under test seems like a reasonable worry.
We're using Python scripts and Python classes to run the standard Python test suite and nobody seems to find that a problem...
capi-sig mailing list -- capi-sig@python.org To unsubscribe send an email to capi-sig-leave@python.org
capi-sig mailing list -- capi-sig@python.org To unsubscribe send an email to capi-sig-leave@python.org
participants (3)
-
Brett Cannon
-
Jeroen Demeyer
-
Pablo Galindo Salgado