Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-106368: Increase Argument Clinic test coverage for cpp.Monitor#106833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
erlend-aasland merged 3 commits intopython:mainfromerlend-aasland:clinic/cpp-test-coverage-altJul 17, 2023
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
132 changes: 131 additions & 1 deletionLib/test/clinic.test.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3726,6 +3726,47 @@ test_preprocessor_guarded_else_impl(PyObject *module) | ||
| /*[clinic end generated code: output=13af7670aac51b12 input=6657ab31d74c29fc]*/ | ||
| #endif | ||
| #ifndef CONDITION_C | ||
| /*[clinic input] | ||
| test_preprocessor_guarded_ifndef_condition_c | ||
| [clinic start generated code]*/ | ||
| static PyObject * | ||
| test_preprocessor_guarded_ifndef_condition_c_impl(PyObject *module) | ||
| /*[clinic end generated code: output=ed422e8c895bb0a5 input=e9b50491cea2b668]*/ | ||
| #else | ||
| /*[clinic input] | ||
| test_preprocessor_guarded_ifndef_not_condition_c | ||
| [clinic start generated code]*/ | ||
| static PyObject * | ||
| test_preprocessor_guarded_ifndef_not_condition_c_impl(PyObject *module) | ||
| /*[clinic end generated code: output=de6f4c6a67f8c536 input=da74e30e01c6f2c5]*/ | ||
| #endif | ||
| #if \ | ||
| CONDITION_D | ||
| /*[clinic input] | ||
| test_preprocessor_guarded_if_with_continuation | ||
| [clinic start generated code]*/ | ||
| static PyObject * | ||
| test_preprocessor_guarded_if_with_continuation_impl(PyObject *module) | ||
| /*[clinic end generated code: output=3d0712ca9e2d15b9 input=4a956fd91be30284]*/ | ||
| #endif | ||
| #if CONDITION_E || CONDITION_F | ||
| #warning "different type of CPP directive" | ||
erlend-aasland marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| /*[clinic input] | ||
| test_preprocessor_guarded_if_e_or_f | ||
| Makes sure cpp.Monitor handles other directives than preprocessor conditionals. | ||
| [clinic start generated code]*/ | ||
| static PyObject * | ||
| test_preprocessor_guarded_if_e_or_f_impl(PyObject *module) | ||
| /*[clinic end generated code: output=e49d24ff64ad88bc input=57b9c37f938bc4f1]*/ | ||
| #endif | ||
| /*[clinic input] | ||
| dump buffer | ||
| output pop | ||
| @@ -3785,6 +3826,79 @@ test_preprocessor_guarded_else(PyObject *module, PyObject *Py_UNUSED(ignored)) | ||
| #endif /* !defined(CONDITION_A) && !(CONDITION_B) */ | ||
| #if !defined(CONDITION_C) | ||
| PyDoc_STRVAR(test_preprocessor_guarded_ifndef_condition_c__doc__, | ||
| "test_preprocessor_guarded_ifndef_condition_c($module, /)\n" | ||
| "--\n" | ||
| "\n"); | ||
| #define TEST_PREPROCESSOR_GUARDED_IFNDEF_CONDITION_C_METHODDEF \ | ||
| {"test_preprocessor_guarded_ifndef_condition_c", (PyCFunction)test_preprocessor_guarded_ifndef_condition_c, METH_NOARGS, test_preprocessor_guarded_ifndef_condition_c__doc__}, | ||
| static PyObject * | ||
| test_preprocessor_guarded_ifndef_condition_c(PyObject *module, PyObject *Py_UNUSED(ignored)) | ||
| { | ||
| return test_preprocessor_guarded_ifndef_condition_c_impl(module); | ||
| } | ||
| #endif /* !defined(CONDITION_C) */ | ||
| #if defined(CONDITION_C) | ||
| PyDoc_STRVAR(test_preprocessor_guarded_ifndef_not_condition_c__doc__, | ||
| "test_preprocessor_guarded_ifndef_not_condition_c($module, /)\n" | ||
| "--\n" | ||
| "\n"); | ||
| #define TEST_PREPROCESSOR_GUARDED_IFNDEF_NOT_CONDITION_C_METHODDEF \ | ||
| {"test_preprocessor_guarded_ifndef_not_condition_c", (PyCFunction)test_preprocessor_guarded_ifndef_not_condition_c, METH_NOARGS, test_preprocessor_guarded_ifndef_not_condition_c__doc__}, | ||
| static PyObject * | ||
| test_preprocessor_guarded_ifndef_not_condition_c(PyObject *module, PyObject *Py_UNUSED(ignored)) | ||
| { | ||
| return test_preprocessor_guarded_ifndef_not_condition_c_impl(module); | ||
| } | ||
| #endif /* defined(CONDITION_C) */ | ||
| #if (CONDITION_D) | ||
| PyDoc_STRVAR(test_preprocessor_guarded_if_with_continuation__doc__, | ||
| "test_preprocessor_guarded_if_with_continuation($module, /)\n" | ||
| "--\n" | ||
| "\n"); | ||
| #define TEST_PREPROCESSOR_GUARDED_IF_WITH_CONTINUATION_METHODDEF \ | ||
| {"test_preprocessor_guarded_if_with_continuation", (PyCFunction)test_preprocessor_guarded_if_with_continuation, METH_NOARGS, test_preprocessor_guarded_if_with_continuation__doc__}, | ||
| static PyObject * | ||
| test_preprocessor_guarded_if_with_continuation(PyObject *module, PyObject *Py_UNUSED(ignored)) | ||
| { | ||
| return test_preprocessor_guarded_if_with_continuation_impl(module); | ||
| } | ||
| #endif /* (CONDITION_D) */ | ||
| #if (CONDITION_E || CONDITION_F) | ||
| PyDoc_STRVAR(test_preprocessor_guarded_if_e_or_f__doc__, | ||
| "test_preprocessor_guarded_if_e_or_f($module, /)\n" | ||
| "--\n" | ||
| "\n" | ||
| "Makes sure cpp.Monitor handles other directives than preprocessor conditionals."); | ||
| #define TEST_PREPROCESSOR_GUARDED_IF_E_OR_F_METHODDEF \ | ||
| {"test_preprocessor_guarded_if_e_or_f", (PyCFunction)test_preprocessor_guarded_if_e_or_f, METH_NOARGS, test_preprocessor_guarded_if_e_or_f__doc__}, | ||
| static PyObject * | ||
| test_preprocessor_guarded_if_e_or_f(PyObject *module, PyObject *Py_UNUSED(ignored)) | ||
| { | ||
| return test_preprocessor_guarded_if_e_or_f_impl(module); | ||
| } | ||
| #endif /* (CONDITION_E || CONDITION_F) */ | ||
| #ifndef TEST_PREPROCESSOR_GUARDED_CONDITION_A_METHODDEF | ||
| #define TEST_PREPROCESSOR_GUARDED_CONDITION_A_METHODDEF | ||
| #endif /* !defined(TEST_PREPROCESSOR_GUARDED_CONDITION_A_METHODDEF) */ | ||
| @@ -3796,7 +3910,23 @@ test_preprocessor_guarded_else(PyObject *module, PyObject *Py_UNUSED(ignored)) | ||
| #ifndef TEST_PREPROCESSOR_GUARDED_ELSE_METHODDEF | ||
| #define TEST_PREPROCESSOR_GUARDED_ELSE_METHODDEF | ||
| #endif /* !defined(TEST_PREPROCESSOR_GUARDED_ELSE_METHODDEF) */ | ||
| #ifndef TEST_PREPROCESSOR_GUARDED_IFNDEF_CONDITION_C_METHODDEF | ||
| #define TEST_PREPROCESSOR_GUARDED_IFNDEF_CONDITION_C_METHODDEF | ||
| #endif /* !defined(TEST_PREPROCESSOR_GUARDED_IFNDEF_CONDITION_C_METHODDEF) */ | ||
| #ifndef TEST_PREPROCESSOR_GUARDED_IFNDEF_NOT_CONDITION_C_METHODDEF | ||
| #define TEST_PREPROCESSOR_GUARDED_IFNDEF_NOT_CONDITION_C_METHODDEF | ||
| #endif /* !defined(TEST_PREPROCESSOR_GUARDED_IFNDEF_NOT_CONDITION_C_METHODDEF) */ | ||
| #ifndef TEST_PREPROCESSOR_GUARDED_IF_WITH_CONTINUATION_METHODDEF | ||
| #define TEST_PREPROCESSOR_GUARDED_IF_WITH_CONTINUATION_METHODDEF | ||
| #endif /* !defined(TEST_PREPROCESSOR_GUARDED_IF_WITH_CONTINUATION_METHODDEF) */ | ||
| #ifndef TEST_PREPROCESSOR_GUARDED_IF_E_OR_F_METHODDEF | ||
| #define TEST_PREPROCESSOR_GUARDED_IF_E_OR_F_METHODDEF | ||
| #endif /* !defined(TEST_PREPROCESSOR_GUARDED_IF_E_OR_F_METHODDEF) */ | ||
| /*[clinic end generated code: output=fcfae7cac7a99e62 input=3fc80c9989d2f2e1]*/ | ||
| /*[clinic input] | ||
| test_vararg_and_posonly | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.