mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-11 00:23:43 +08:00
0e51ecbb7e
version: sunnypilot v2026.003.000 (dev)
date: 2026-09-09T15:43:49
master commit: b255314f5a
18 lines
591 B
Python
18 lines
591 B
Python
import sys, unittest
|
|
|
|
class TestObjCMetaSpec(unittest.TestCase):
|
|
@unittest.skipUnless(sys.platform == "darwin", "objc runtime only on macOS")
|
|
def test_classmethods_are_classmethods(self):
|
|
from tinygrad.runtime.support.objc import Spec, id_
|
|
|
|
#_classmethods_ must include classmethod descriptors
|
|
class ObjCTest(Spec):
|
|
_methods_ = [("foo", id_, [])]
|
|
_classmethods_ = [("bar", id_, [])]
|
|
|
|
self.assertNotIsInstance(ObjCTest.__dict__["foo"], classmethod)
|
|
self.assertIsInstance(ObjCTest.__dict__["bar"], classmethod)
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|