Testing installation profile with custom tasks
I typically find it best to leave your installation profile as bare bones as possible, and put tasks like this into hook_enable of a site specific module.  Similarly, any updates that need to be made should be put into hook_update_N functions in the same module, while updating the hook_enable implementation.

This makes it much simpler to test and has the added benefit of keeping all of your setup and updates in one place.