Repository navigation
Conversation
|
@vstinner can you please take a look? :) |
|
This PR is stale because it has been open for 90 days with no activity. |
vstinner
left a comment
There was a problem hiding this comment.
Would it be possible to write a test to test this code path? See with support.inject_memory_error_cm():.
|
I think that it would be rather hard to do :( So, instead I added Before: After: all tests pass 🎉 |
1b2ef1e to
d2e2e46
Compare
|
|
||
| def test_object_clear_managed_dict(self): | ||
| # PyObject_ClearManagedDict | ||
| clear = _testcapi.pyobject_clear_managed_dict |
There was a problem hiding this comment.
nitpick: I would prefer to call it clear_managed_dict, since clear() sounds like a different function (like PyDict_Clear()). Same remark in the second test.
|
|
||
| @threading_helper.requires_working_threading() | ||
| def test_object_clear_managed_dict_ft_memory_error(self): | ||
| # PyObject_ClearManagedDict, gh-152254 |
There was a problem hiding this comment.
Can you write a short sentence to describe the purpose of the test? I understand that you call PyObject_ClearManagedDict() from a different thread so _Py_IsOwnedByCurrentThread() is false.
PyObject_ClearManagedDicton Free Threading #152254