GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Three tests fails with `PYTEST_PLUGINS` set to `_hypothesis_pytestplugin` · Issue #12647 · pytest-dev/pytest

Three tests fails with PYTEST_PLUGINS set to _hypothesis_pytestplugin #12647

New issue
Copy link
New issue
Copy link
Closed
#13318
Closed
Three tests fails with PYTEST_PLUGINS set to _hypothesis_pytestplugin#12647
#13318
Copy link
Labels
good first issueeasy issue that is friendly to new contributortype: selftestsa problem in the tests of pytest

Description

@mtelka
mtelka
opened on Jul 22, 2024
Issue body actions
  • a detailed description of the bug or problem you are having
  • output of pip list from the virtual environment you are using
  • pytest and operating system versions
  • minimal example if possible

I tried to run pytest tests in the main git branch with the following change in tox.ini:

diff --git a/tox.ini b/tox.ini
index 61563ca2c..bc08595c3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -51,6 +51,8 @@ passenv =
     TERM
     SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST
 setenv =
+    PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+    PYTEST_PLUGINS=_hypothesis_pytestplugin
     _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:}
 
     # See https://docs.python.org/3/library/io.html#io-encoding-warning

and I found that the following three tests failed:

=========================== short test summary info ============================
FAILED testing/test_helpconfig.py::test_version_verbose - assert <ExitCode.IN...
FAILED testing/test_helpconfig.py::test_version_less_verbose - assert <ExitCo...
FAILED testing/test_terminal.py::TestTerminalFunctional::test_header_trailer_info
XPASS testing/_py/test_local.py::TestLocalPath::test_make_numbered_dir_multiprocess_safe - #11603
= 3 failed, 3609 passed, 112 skipped, 11 xfailed, 1 xpassed in 312.55s (0:05:12) =

All three tests fails with the following error:

ValueError: Plugin already registered under a different name: _hypothesis_pytestplugin=<module '_hypothesis_pytestplugin' from '/data/builds/pytest/.tox/py39/lib/python3.9/site-packages/_hypothesis_pytestplugin.py'>

Probably (untested) we need to add monkeypatch.delenv("PYTEST_PLUGINS", raising=False) call to affected functions.

This seems to be related: #12616 (comment)

Reacted by John Litborn

Activity

  1. mtelka
    changed the title [-]Three tests fails with `PYTEST_PLUGINS` set[/-] [+]Three tests fails with `PYTEST_PLUGINS` set to `_hypothesis_pytestplugin`[/+] on Jul 22, 2024
  2. Zac-HD
    added
    type: selftestsa problem in the tests of pytest
    on Oct 30, 2024
  3. jakkdl
    added
    good first issueeasy issue that is friendly to new contributor
    on Feb 24, 2025
  4. nicoddemus
    closed this as completedin #13318on Apr 7, 2025
  5. nicoddemus
    closed this as completedin 0286f64on Apr 7, 2025
  6. patchback
    added a commit that references this issue on Apr 7, 2025

    Fix test suite when PYTEST_PLUGINS is set

    This issue will close once commit 730b5de is merged into the 'main' branch.
    730b5de
  7. nicoddemus
    added a commit that references this issue on Apr 7, 2025

    Fix test suite when PYTEST_PLUGINS is set (#13361)

    This issue will close once commit fd2495c is merged into the 'main' branch.
    fd2495c
  8. Pierre-Sassoulas
    added a commit that references this issue on Apr 8, 2025

    Fix test suite when PYTEST_PLUGINS is set

    This issue will close once commit 0286f64 is merged into the 'main' branch.
    0286f64
  9. luketainton
    added a commit that references this issue on Jan 5, 2026

    chore(deps): update dependency pytest to v9 (#305)

    4b75154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueeasy issue that is friendly to new contributortype: selftestsa problem in the tests of pytest

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.