Yes, it's safe to remove the CMOS battery for testing purposes. Just ensure the computer is unplugged and powered off before doing so.