python COBRA testcode