human
Solve the following python programming problem given the following code:
@pytest.mark.parametrize(u'default_config', [u'ini', u'cmdline'])
def test_filterwarnings_mark(testdir, default_config):
assistant
#Here is the Python code you requested.

    """Test ``filterwarnings`` mark works and takes precedence over command line and ini options.
    """
    if (default_config == u'ini'):
        testdir.makeini(u'\n                                                [pytest]\n                                                filterwarnings    =    always\n                                ')
    testdir.makepyfile(u"\n                                import    warnings\n                                import    pytest\n\n                                @pytest.mark.filterwarnings('ignore::RuntimeWarning')\n                                def    test_ignore_runtime_warning():\n                                                warnings.warn(RuntimeWarning())\n\n                                @pytest.mark.filterwarnings('error')\n                                def    test_warning_error():\n                                                warnings.warn(RuntimeWarning())\n\n                                def    test_show_warning():\n                                                warnings.warn(RuntimeWarning())\n                ")
    result = testdir.runpytest((u'-W    always' if (default_config == u'cmdline') else u''))
    result.stdout.fnmatch_lines([u'*=    1    failed,    2    passed,    1    warnings    in    *'])