We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52c6d73 commit 06a50eaCopy full SHA for 06a50ea
1 file changed
init_test.go
@@ -2,14 +2,20 @@ package python_test
2
3
import (
4
"os"
5
+ "runtime"
6
"testing"
7
8
python3 "go.nhat.io/python/v3"
9
)
10
11
// TestMain is the entry point for the test suite.
12
func TestMain(m *testing.M) {
- defer python3.Finalize()
13
+ runtime.LockOSThread()
14
- os.Exit(m.Run()) // nolint: gocritic
15
+ ret := m.Run()
16
+
17
+ python3.Finalize()
18
+ runtime.UnlockOSThread()
19
20
+ os.Exit(ret)
21
}
0 commit comments