def METHOD_NAME(tmpdir):
    valid_extensions = _make_valid_extensions()
    valid_extensions = list(valid_extensions)
    mock_files = _make_fake_files(valid_extensions, seed=42)
    mockdir = _make_mock_dir(tmpdir, mock_files)
    with warnings.catch_warnings():
        warnings.simplefilter("error")
        filtered = filter_valid_files(mockdir, valid_extensions=valid_extensions)
    assert len(filtered) == len(mockdir)