def METHOD_NAME(workspace, newline):
    """
    Check that Pycodestyle doesn't generate false positives with line endings
    other than LF.
    """
    # Create simple source that should give false positives
    source = f"try:{newline}    1/0{newline}except Exception:{newline}    pass{newline}"
    # Create document
    doc = Document(DOC_URI, workspace, source)
    # Get diagnostics
    diags = pycodestyle_lint.pylsp_lint(workspace, doc)
    # Assert no diagnostics were given
    assert len(diags) == 0