script changed to pytest testing framework