Skip to content

Commit e0c9c1e

Browse files
committed
Fix segmentation violation
1 parent 52c6d73 commit e0c9c1e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

init_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ package python_test
22

33
import (
44
"os"
5+
"runtime"
56
"testing"
67

78
python3 "go.nhat.io/python/v3"
89
)
910

1011
// TestMain is the entry point for the test suite.
1112
func TestMain(m *testing.M) {
13+
runtime.LockOSThread()
14+
defer runtime.UnlockOSThread()
15+
1216
defer python3.Finalize()
1317

1418
os.Exit(m.Run()) // nolint: gocritic

0 commit comments

Comments
 (0)