Skip to content

Commit e8ea62a

Browse files
committed
Add a test that we're not enabling the GIL.
1 parent 0778d50 commit e8ea62a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/greenlet/tests/test_greenlet.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,5 +1349,13 @@ def test_reentrant_switch_run_callable_has_del(self):
13491349
output
13501350
)
13511351

1352+
class TestModule(TestCase):
1353+
1354+
def test_no_gil_on_free_threaded(self):
1355+
if RUNNING_ON_FREETHREAD_BUILD:
1356+
self.assertFalse(sys._is_gil_enabled())
1357+
else:
1358+
self.assertTrue(sys._is_gil_enabled())
1359+
13521360
if __name__ == '__main__':
13531361
unittest.main()

0 commit comments

Comments
 (0)