Skip to content

Commit

Permalink
Add plugin to allow options to be supplied for missing plugins. Worka…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Sep 4, 2020
1 parent b6ac0e9 commit 7c130bd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
18 changes: 18 additions & 0 deletions jaraco/test/pytest/allow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import toml
from more_itertools import always_iterable
from jaraco.context import suppress
from jaraco.functools import apply


@apply(always_iterable)
@suppress(Exception)
def read_opts():
with open('pyproject.toml') as strm:
defn = toml.load(strm)
section = defn.get("tool.jaraco.test.pytest.allow", {})
breakpoint()


def pytest_addoption(parser, pluginmanager):
for opt in read_opts():
parser.add_option(opt)
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ classifiers =
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Framework :: Pytest

[options]
packages = find:
include_package_data = true
python_requires = >=3.6
install_requires =
toml
jaraco.functools
jaraco.context
more_itertools
setup_requires = setuptools_scm[toml] >= 3.4.1

[options.extras_require]
Expand All @@ -41,3 +46,5 @@ docs =
# local

[options.entry_points]
pytest11 =
allow missing params = jaraco.test.pytest.allow

0 comments on commit 7c130bd

Please sign in to comment.