I use pykka python library. I would like to create an actor, and later test if the actor created is of the proper class.
class MyActor( ThreadingActor ):
# ...
actor = MyActor.start().proxy()
assert actor.__class__ == MyActor # check here?
Here actor.__class__ is pykka.actor.ActorRef. How to check if it refers to MyActor class? I need it for a unit test suite.
To get the actor class from an
pykka.actor.ActorRef:To get the actor class from an
pykka.proxy.ActorProxy:I’ve forgotten to document the
actor_classfield onActorRefobjects, but all fields that are not made “private” by prefixing with underscore will continue to be supported in the future.