|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
Sorry, something went wrong.
|
I'm not sure who is best positioned to review this, but maybe @corona10 could take a look? |
Sorry, something went wrong.
|
I'm not sure who is best positioned to review this, but maybe @corona10 could take a look? Okay, I will take a look by this weekend :) |
Sorry, something went wrong.
There was a problem hiding this comment.
Would you like to separate the file into Modules/_testcapi/pyos.c
likewise https://github.com/python/cpython/blob/main/Modules/_testcapi/float.c ?
The test itself looks good.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
|
I have made the requested changes; please review again. @corona10 Thank you for the review! I've separated the tests. Although I haven't managed to run the tests from Modules/_testcapi on my machine. Before separating, I ran my tests via ./python -m test -v test_capi, but now they are not executed as I see. I found the C API Tests paragraph in the devguide, but I didn't find how to run these tests. Could you please clarify? |
Sorry, something went wrong.
|
Thanks for making the requested changes! @corona10: please review the changes made to this pull request. |
Sorry, something went wrong.
|
I've found out that the tests were not executed because of the wrong naming. Test_testcapi only executes the test method if its built-in name starts with test_ and doesn't end with _code: cpython/Lib/test/test_capi/test_misc.py Lines 1422 to 1425 in ced13c9 It is mentioned in the C API Tests paragraph to some extent: Functions named test_* are used as tests directly But at first reading, I got confused because in _testcapi/float.c file, the test_ prefix is only used in the C function name: cpython/Modules/_testcapi/float.c Lines 84 to 88 in 534660f However, in contrast to my tests, these test methods are actually executed through test_float.py: cpython/Lib/test/test_float.py Lines 1516 to 1519 in 534660f I hope this investigation might help other first-time contributors. @corona10 If you think it would be helpful to clarify this point in the devguide, please let me know, and I'll be happy to open a corresponding PR. |
Sorry, something went wrong.
|
I've found out that the tests were not executed because of the wrong naming. AFAIK, those things are intended. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
But I want to listen to the opinion of @erlend-aasland for this testing structure.
Sorry, something went wrong.
|
@erlend-aasland could you please take a look? |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.