Sprite has a __dict__, despite its __slots__, because of PymunkMixin
The class Sprite defines __slots__ at
https://github.com/pythonarcade/arcade/blob/580dd21603c662502326678a2edcde5a72a42f3e/arcade/sprite/sprite.py#L48-L62
However, it still gets a __dict__, because it extends PymunkMixin, which does not define __slots__.
It's not possible to add __slots__ = ('pymunk',) to PymunkMixin, because a class cannot extend two classes that define non-empty __slots__.
I suggest adding an empty __slots__ = () to PymunkMixin, and add 'pymunk' to the slots of Sprite. It's not pretty, but it seems like the least disruptive change.
We can observe the difference by looking at the __dict__ property:
basic = BasicSprite('whatever')
print(basic.__dict__) # AttributeErrror, good!
sprite = Sprite('whatever')
print(sprite.__dict__) # displays a dict, bad
That can form the basis of a unit test.
This was done deliberately because we didn't want to break backwards compatibility supporting dynamic members in Sprite.
Ah I see. That makes sense. But wouldn't it be clearer to then list "__dict__" explicitly in the __slots__, rather than relying on the fact there happens to be a mixin without __slots__?