#7663 pytest 3.7.0 fails on pytest_plugins in ipatests.plugins
Closed: fixed Opened by cheimes.

The module attribute pytest_plugins is a special marker to tell pytest, which plugins it should load. Starting with version 3.7.0, pytest stumbles over ipatests.pytest_plugins:

specs = <module 'ipatests.pytest_plugins' from 'freeipa/.tox/py36/lib/python3.6/site-packages/ipatests/pytest_plugins/__init__.py'>
    def _get_plugin_specs_as_list(specs):
        """
        Parses a list of "plugin specs" and returns a list of plugin names.
        Plugin specs can be given as a list of strings separated by "," or already as a list/tuple in
        which case it is returned as a list. Specs can also be `None` in which case an
        empty list is returned.
        """
        if specs is not None:
            if isinstance(specs, str):
                specs = specs.split(",") if specs else []
            if not isinstance(specs, (list, tuple)):
                raise UsageError(
                    "Plugin specs must be a ','-separated string or a "
>                   "list/tuple of strings for plugin names. Given: %r" % specs
                )
E               _pytest.config.exceptions.UsageError: Plugin specs must be a ','-separated string or a list/tuple of strings for plugin names. Given: <module 'ipatests.pytest_plugins' from 'freeipa/.tox/py36/lib/python3.6/site-packages/ipatests/pytest_plugins/__init__.py'>
lib/python3.6/site-packages/_pytest/config/__init__.py:513: UsageError

Simply renaming the package to ipatests.pytest_ipa resolves the problem


master:

  • 64145093434e2601b8352e9ce95b3316d7ac524d Rename pytest_plugins to ipatests.pytest_ipa

ipa-4-7:

  • e0a8a296be680f2a6593e81084d66828c08e4dad Rename pytest_plugins to ipatests.pytest_ipa

ipa-4-6:

  • 6000ecc0270ce8272dd522d1f1be00e6a6c23c53 Rename pytest_plugins to ipatests.pytest_ipa
  • 235f5b79c106ec3a9b82e261c8aafcc454e48b5f Do not check deleted files with make fastlint

Pull request: https://github.com/freeipa/freeipa/pull/2199

Metadata Update from @abiagion:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata