Improved python_pkstring_test