Skip to content

Some tests fail under pytest 4.0.1 due to deprecation warnings #2269

@chestm007

Description

@chestm007

Expected behaviour:

For all tests to pass

Actual behaviour:

Some tests fail due to Deprecation warnings

Steps to reproduce:

  • install pytest==4.0.1
  • run tests

Config:

not relevant

Log:

Below is a very condensed version of the actual output as its only these 2 deprecated methods causing the failures (click to expand)
E
test setup failed
request = <SubRequest 'filecopy' for <Function 'test_memory_cache'>>

    @pytest.yield_fixture()
    def filecopy(request):
        out_files = []
        marker = request.node.get_marker('filecopy')
        if marker is not None:
>           copy_list = marker.args[0] if len(marker.args) == 1 else [marker.args]
E           _pytest.warning_types.RemovedInPytest4Warning: MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly.
E           Please use node.get_closest_marker(name) or node.iter_markers(name).
E           Docs: https://docs.pytest.org/en/latest/mark.html#updating-code

conftest.py:206: RemovedInPytest4Warning


E
test setup failed
request = <SubRequest 'manager' for <Function 'test_existing_dirs[internal]'>>
config = "\n        templates:\n          global:\n            parsing:\n              movie: internal\n        tasks:\n       ...            accept_all: yes\n            exists_movie: /tmp/pytest-of-max/pytest-6/test_existing_dirs_internal_0\n    "
caplog = <_pytest.logging.LogCaptureFixture object at 0x7fc7d9de32b0>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc7d9de3f98>
filecopy = None

    @pytest.yield_fixture()
    def manager(request, config, caplog, monkeypatch, filecopy):  # enforce filecopy is run before manager
        """
        Create a :class:`MockManager` for this test based on `config` argument.
        """
        if 'tmpdir' in request.fixturenames:
>           config = config.replace('__tmp__', request.getfuncargvalue('tmpdir').strpath)

conftest.py:66: 

Additional information:

  • FlexGet version: commit#69216697d3513132bcfa25b7838caf758929b342
  • Python version: Python 3.7.1
  • Installation method: not installed, running tests on source code
  • Using daemon (yes/no): n/a
  • OS and version: Arch Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions