simplify python_kmp vars; add tests