pytest-console-scripts icon indicating copy to clipboard operation
pytest-console-scripts copied to clipboard

extremely slow execution of script tests

Open stefaanhessmann opened this issue 5 years ago • 3 comments

Hey,

I am using the pytest-console-scripts in order to test if some of my scripts are working fine. The scripts perform a single training step for a machine learning model. Until recently the script test was working well, but since I created a new environment and reinstalled pytest-console-scripts, the script test is about ten times slower. I have no idea what went wrong... Do you know what could be going on here?

Best, Stefaan

stefaanhessmann avatar Oct 07 '20 13:10 stefaanhessmann

Hi, @Stefaanhess,

I have recently released version 1.0.0 that has quite significant changes. Could you downgrade to 0.2.0 and see if the speed changes? Then we can try to figure out what's going wrong now.

Cheers, Vasily

kvas-it avatar Oct 07 '20 13:10 kvas-it

Hi @kvas-it ,

I downgraded to the 0.2.0 version, but the issue is still there. I also downgraded pytest without any effect. Somehow one of my collegues has the same issue since about a week ago. First he got the error message:

E fixture 'script_runner' not found

After reinstalling pytest-console-scripts the test run again, but the script tests got extremly slow. Surprisingly the scripts run with normal speed on the travis-ci servers. I will check if some other packages have been updated or something.

Cheers, Stefaan

stefaanhessmann avatar Oct 07 '20 14:10 stefaanhessmann

First he got the error message: "fixture 'script_runner' not found"

This would mean that pytest-console-scripts is not installed (or maybe something else went wrong).

If the scripts run with normal speed on travis-ci servers, then I suppose it would be something about the testing environment on your and your colleague's computers. Have you tried activating the test virtualenv and running the scripts by hand (without pytest)?

kvas-it avatar Oct 07 '20 16:10 kvas-it