Skip to content

Commit fb17c68

Browse files
dgelessuseryksun
andcommitted
Apply suggestions from code review
Co-authored-by: Eryk Sun <[email protected]>
1 parent 611f1b6 commit fb17c68

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Lib/test/test_ctypes/test_refcounts.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,14 @@ def func(a, b):
9999

100100
@support.refcount_test
101101
def test_callback_py_object_none_return(self):
102-
"""Test that returning ``None`` from a ``py_object`` callback
103-
does not affect ``None``'s refcount (bpo-36880)."""
102+
# bpo-36880: test that returning None from a py_object callback
103+
# does not decrement the refcount of None.
104104

105105
import sys
106106

107107
for FUNCTYPE in (ctypes.CFUNCTYPE, ctypes.PYFUNCTYPE):
108108
with self.subTest(FUNCTYPE=FUNCTYPE):
109-
proto = FUNCTYPE(ctypes.py_object)
110-
@proto
109+
@FUNCTYPE(ctypes.py_object)
111110
def func():
112111
return None
113112

0 commit comments

Comments
 (0)