move pytest into script