Conversion to PyTest