More work on the Cython writer including tests