lipro / sphinxcontrib-ansi

Sphinx extension that parse ANSI color sequences inside documents.
http://bitbucket.org/birkenfeld/sphinx-contrib
Other
0 stars 4 forks source link

Deprecate "pytest_funcarg__" prefix for fixtures #1

Open rexut opened 7 years ago

rexut commented 7 years ago

Start to issue deprecation warnings to support pytest version 4.0. Warning is:

================================ test session starts ================================
platform linux2 -- Python 2.7.12, pytest-3.1.0, py-1.4.33, pluggy-0.4.0
rootdir: /home/slz/Devel/REXUT/sphinxcontrib-ansi, inifile:
collected 3 items 

test_ansi.py ...

================================= warnings summary ==================================
test_ansi.py
  pytest_funcarg__app: declaring fixtures using "pytest_funcarg__" prefix is
    deprecated and scheduled to be removed in pytest 4.0.  Please remove the prefix
    and use the @pytest.fixture decorator instead.
  pytest_funcarg__paragraph: declaring fixtures using "pytest_funcarg__" prefix is
    deprecated and scheduled to be removed in pytest 4.0.  Please remove the prefix
    and use the @pytest.fixture decorator instead.
  pytest_funcarg__parser: declaring fixtures using "pytest_funcarg__" prefix is
    deprecated and scheduled to be removed in pytest 4.0.  Please remove the prefix
    and use the @pytest.fixture decorator instead.

-- Docs: http://doc.pytest.org/en/latest/warnings.html
======================= 3 passed, 3 warnings in 0.05 seconds ========================
rexut commented 7 years ago

Just replace as describe in pytest-dev/pytest#1684:

def pytest_funcargs__hello():
    ...

with:

@pytest.fixture
def hello():
    ...