Skip to content

Commit 6f45cae

Browse files
authored
Update PythonRuntimeTests.swift
1 parent 8848f84 commit 6f45cae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Tests/PythonKitTests/PythonRuntimeTests.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,12 @@ class PythonRuntimeTests: XCTestCase {
328328
}
329329

330330
func testPythonFunction() {
331+
let versionMajor = Python.versionInfo.major
332+
let versionMinor = Python.versionInfo.minor
333+
guard (versionMajor == 3 && versionMinor >= 1) || versionMajor > 3 else {
334+
return
335+
}
336+
331337
let pythonAdd = PythonFunction { (params: [PythonObject]) in
332338
let lhs = params[0]
333339
let rhs = params[1]

0 commit comments

Comments
 (0)