The plugin doesn't work with pytest 4

When used with pytest 4.x, the plugin fails on:

AttributeError: 'Function' object has no attribute 'get_marker'

To reproduce, run unit tests via tox.

Details

==================================== ERRORS ====================================
__________________ ERROR at setup of test_hosts_panel_status ___________________

request = <SubRequest 'ansible_playbook' for <Function 'test_hosts_panel_status'>>

    @pytest.fixture
    def ansible_playbook(request):
        """
        Pytest fixture which runs given ansible playbook. When ansible returns
        nonzero return code, the test case which uses this fixture is not
        executed and ends in ``ERROR`` state.
        """
        setup_marker = request.node.get_marker('ansible_playbook_setup')
        setup_playbooks = []
        teardown_marker = request.node.get_marker('ansible_playbook_teardown')
        teardown_playbooks = []
    
        if setup_marker is None and teardown_marker is None:
            msg = (
                "no ansible playbook is specified for the test case, "
                "please add a decorator like this one "
                "``@pytest.mark.ansible_playbook_setup('playbook.yml')`` "
                "or "
                "``@pytest.mark.ansible_playbook_teardown('playbook.yml')`` "
                "for ansible_playbook fixture to know which playbook to use")
            raise Exception(msg)
        if setup_marker is not None:
>           setup_playbooks = setup_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

References

Edited by mbukatov