We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 887af3a commit 002e3d9Copy full SHA for 002e3d9
Tests/PythonKitTests/PythonFunctionTests.swift
@@ -89,7 +89,20 @@ class PythonFunctionTests: XCTestCase {
89
// `[String: PythonObject]`. To fix this error, we add a
90
// `@_disfavoredOverload` attribute to the more specific initializer.
91
func testPythonClassInitializer() {
92
+ guard canUsePythonFunction else {
93
+ return
94
+ }
95
+
96
+ let MyClass = PythonClass(
97
+ "MyClass",
98
+ superclasses: [Python.object],
99
+ members: [
100
+ "memberName": "memberValue",
101
+ ]
102
+ ).pythonObject
103
104
+ let memberValue = MyClass().memberName
105
+ XCTAssertEqual(String(memberValue), "memberValue")
106
}
107
108
func testPythonClassInheritance() {
0 commit comments