diff --git a/_pytest/logging.py b/_pytest/logging.py index d3ac81e65..7234bdeb0 100644 --- a/_pytest/logging.py +++ b/_pytest/logging.py @@ -1,3 +1,4 @@ +""" Access and control log capturing. """ from __future__ import absolute_import, division, print_function import logging diff --git a/_pytest/main.py b/_pytest/main.py index 97c6e276c..359945175 100644 --- a/_pytest/main.py +++ b/_pytest/main.py @@ -177,7 +177,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') diff --git a/changelog/3209.doc.rst b/changelog/3209.doc.rst new file mode 100644 index 000000000..84e165805 --- /dev/null +++ b/changelog/3209.doc.rst @@ -0,0 +1 @@ +Add logging plugin to plugins list. \ No newline at end of file diff --git a/changelog/3241.bugfix.rst b/changelog/3241.bugfix.rst new file mode 100644 index 000000000..2b8b07d83 --- /dev/null +++ b/changelog/3241.bugfix.rst @@ -0,0 +1,2 @@ +Refactor check of bindir from ``exists`` to ``isdir`` regarding `#3241 `_. + diff --git a/doc/en/plugins.rst b/doc/en/plugins.rst index 400418aee..2a9fff81b 100644 --- a/doc/en/plugins.rst +++ b/doc/en/plugins.rst @@ -148,6 +148,7 @@ in the `pytest repository `_. _pytest.resultlog _pytest.runner _pytest.main + _pytest.logging _pytest.skipping _pytest.terminal _pytest.tmpdir