Tests for wrapping Python shell