| [case testNoDeps] | |
| def f() -> None: | |
| pass | |
| [out] | |
| No deps | |
| [case testStringsCapsuleDep] | |
| from librt.strings import StringWriter | |
| def f() -> None: | |
| StringWriter() | |
| [out] | |
| Capsule(name='librt.strings') | |
| [case testStringsCapsuleDepFromParamType] | |
| from librt.strings import StringWriter | |
| def f(s: StringWriter) -> None: | |
| pass | |
| [out] | |
| Capsule(name='librt.strings') | |
| [case testStringsCapsuleDepFromReturnType] | |
| from librt.strings import StringWriter | |
| def f() -> StringWriter: | |
| assert False | |
| [out] | |
| Capsule(name='librt.strings') | |
| [case testStringsCapsuleDepFromUnion] | |
| from typing import Union | |
| from librt.strings import StringWriter | |
| def f(s: Union[StringWriter, str]) -> None: | |
| pass | |
| [out] | |
| Capsule(name='librt.strings') | |
| [case testStringsCapsuleDepFromTuple] | |
| from librt.strings import StringWriter | |
| def f(s: tuple[int, StringWriter]) -> None: | |
| pass | |
| [out] | |
| Capsule(name='librt.strings') | |
| [case testExtraFileDep] | |
| from librt.strings import StringWriter | |
| def f(s: StringWriter) -> int: | |
| return s[0] | |
| [out] | |
| Capsule(name='librt.strings') | |
| SourceDep(path='stringwriter_extra_ops.c') | |
| [case testMultipleCapsuleDeps1_experimental] | |
| from librt.strings import StringWriter | |
| from librt.base64 import b64encode | |
| def f() -> None: | |
| StringWriter() | |
| def g() -> bytes: | |
| return b64encode(b'foo') | |
| [out] | |
| Capsule(name='librt.base64') | |
| Capsule(name='librt.strings') | |
| [case testMultipleCapsuleDeps2_experimental] | |
| from librt.strings import StringWriter | |
| from librt.base64 import b64encode | |
| def f() -> bytes: | |
| StringWriter() | |
| return b64encode(b'foo') | |
| [out] | |
| Capsule(name='librt.base64') | |
| Capsule(name='librt.strings') | |
| [case testVecCapsuleDepInFunction] | |
| from librt.vecs import vec | |
| def f() -> None: | |
| vec[str]() | |
| [out] | |
| Capsule(name='librt.vecs') | |
| [case testVecCapsuleDepInMethod] | |
| from librt.vecs import vec | |
| class C: | |
| def m(self) -> None: | |
| vec[str]() | |
| [out] | |
| Capsule(name='librt.vecs') | |
| [case testVecCapsuleDepAtTopLevel] | |
| from librt.vecs import vec | |
| vec[str]() | |
| [out] | |
| Capsule(name='librt.vecs') | |
| [case testVecCapsuleDepInAttributeType] | |
| from librt.vecs import vec | |
| class C: | |
| v: vec[str] | |
| [out] | |
| Capsule(name='librt.vecs') |