modified unit tests to suit all python versions