Look into how we can test package_manager.py including the installation and removal of packages, and specifically smart. A good place to start might be create_rootfs in rootfs.py. That function should certainly have a test in oe-selftest.
Whilst this is a nice idea, its probably a lot of work and its therefore something we don't plan to do right now, its a lot more complex than originally thought.