Skip to content

Commit 6ef0ee3

Browse files
committed
fix test_thread for cpython
1 parent f1da59d commit 6ef0ee3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_thread.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@
3939
import random
4040
import re
4141
import sys
42+
try:
43+
import _sysconfig as syscfg
44+
except Exception:
45+
import sysconfig as syscfg
4246

43-
import _sysconfig
44-
45-
if _sysconfig.get_config_var('WITH_THREAD'):
47+
if syscfg.get_config_var('WITH_THREAD'):
4648
import threading
4749
import unittest
4850
from test import support

0 commit comments

Comments
 (0)