Bugfixes and improvements in rbapf_test.py