Ported ngspice-shared test to Python
minor changes