Skip to content

Commit

Permalink
remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
dpdani committed Jun 7, 2024
1 parent cb698b3 commit 737eb09
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions Lib/test/test_free_threading/test_slots.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
from unittest import TestCase


# import _testcapi


def run_in_threads(targets):
"""Run `targets` in separate threads"""
threads = [
Expand All @@ -24,8 +21,7 @@ class TestSlots(TestCase):
def test_object(self):
class Spam:
__slots__ = [
"eggs", # the Py_T_OBJECT_EX type is missing in
# Modules/_testcapi/structmember.c
"eggs",
]

def __init__(self, initial_value):
Expand All @@ -45,21 +41,3 @@ def reader():
assert 0 <= eggs <= iters

run_in_threads([writer, reader, reader, reader])

# def test_bool(self):
# spam_old = _testcapi._test_structmembersType_OldAPI()
# spam_new = _testcapi._test_structmembersType_NewAPI()
#
# def writer():
# for _ in range(1_000):
# spam_old.T_BOOL = True
# spam_old.T_BOOL = False # separate code path for True/False
# spam_new.T_BOOL = True
# spam_new.T_BOOL = False
#
# def reader():
# for _ in range(1_000):
# spam_old.T_BOOL
# spam_new.T_BOOL
#
# run_in_threads([writer, reader, reader, reader])

0 comments on commit 737eb09

Please sign in to comment.