Merge pull request #3277 from maiksensi/bug/3241-check-if-dir-exists
Use `isdir` instead of `exists`
This commit is contained in:
commit
e980fbbe39
|
@ -170,7 +170,7 @@ def _in_venv(path):
|
|||
"""Attempts to detect if ``path`` is the root of a Virtual Environment by
|
||||
checking for the existence of the appropriate activate script"""
|
||||
bindir = path.join('Scripts' if sys.platform.startswith('win') else 'bin')
|
||||
if not bindir.exists():
|
||||
if not bindir.isdir():
|
||||
return False
|
||||
activates = ('activate', 'activate.csh', 'activate.fish',
|
||||
'Activate', 'Activate.bat', 'Activate.ps1')
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Refactor check of bindir from ``exists`` to ``isdir`` regarding `#3241 <https://github.com/pytest-dev/pytest/issues/3241>`_.
|
||||
|
Loading…
Reference in New Issue