diff options
| -rwxr-xr-x | run_tests | 4 |
1 files changed, 4 insertions, 0 deletions
| @@ -24,6 +24,10 @@ import sys | |||
| 24 | 24 | ||
| 25 | def find_pytest(): | 25 | def find_pytest(): |
| 26 | """Try to locate a good version of pytest.""" | 26 | """Try to locate a good version of pytest.""" |
| 27 | # If we're in a virtualenv, assume that it's provided the right pytest. | ||
| 28 | if 'VIRTUAL_ENV' in os.environ: | ||
| 29 | return 'pytest' | ||
| 30 | |||
| 27 | # Use the Python 3 version if available. | 31 | # Use the Python 3 version if available. |
| 28 | ret = shutil.which('pytest-3') | 32 | ret = shutil.which('pytest-3') |
| 29 | if ret: | 33 | if ret: |
