def test_requirement_object():
    top_of_file = Requirement()
    top_of_file.comments.append('#foo')
    top_of_file.value = b'\n'

    requirement_foo = Requirement()
    requirement_foo.value = b'foo'

    requirement_bar = Requirement()
    requirement_bar.value = b'bar'

    # This may look redundant, but we need to test both foo.__lt__(bar) and
    # bar.__lt__(foo)
    assert requirement_foo > top_of_file
    assert top_of_file < requirement_foo
    assert requirement_foo > requirement_bar
    assert requirement_foo < requirement_bar
dataset/ETHPy150Open pre-commit/pre-commit-hooks/tests/requirements_txt_fixer_test.py/test_requirement_object/swapped operands of `<`