joythief.objects module¶
Matchers for general object types.
- class joythief.objects.InstanceOf(type_, *, nullable=False)[source]¶
Bases:
Matcher[T]Matches any instance of the specified type(s).
This matcher compares the received value using
isinstance(), so accepts either a single type or a tuple of types. Withnullableset toTrue, the received value can also beNone.Originally formulated for this answer.