Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ package python_test

import (
"os"
"runtime"
"testing"

python3 "go.nhat.io/python/v3"
)

// TestMain is the entry point for the test suite.
func TestMain(m *testing.M) {
defer python3.Finalize()
runtime.LockOSThread()

os.Exit(m.Run()) // nolint: gocritic
ret := m.Run()

python3.Finalize()
runtime.UnlockOSThread()

os.Exit(ret)
}
Loading