def test_tweet_ordering():
    now = datetime.now(timezone.utc)
    tweet_1 = Tweet("A", now)
    tweet_2 = Tweet("B", now + timedelta(hours=1))
    tweet_3 = Tweet("C", now + timedelta(hours=2))
    tweet_4 = Tweet("D", now + timedelta(hours=2))
    tweet_5 = Tweet("D", now + timedelta(hours=2))

    source = Source("foo", "bar")

    # explicit testing
    with pytest.raises(TypeError):
        tweet_1 < source

    with pytest.raises(TypeError):
        tweet_1 <= source

    with pytest.raises(TypeError):
        tweet_1 > source

    with pytest.raises(TypeError):
        tweet_1 >= source

    assert tweet_1 != source

    assert tweet_1 < tweet_2
    assert tweet_2 <= tweet_1
    assert tweet_2 > tweet_1
    assert tweet_2 >= tweet_1
    assert tweet_3 != tweet_4
    assert tweet_5 == tweet_4
    assert tweet_5 >= tweet_4
    assert tweet_5 <= tweet_4
    assert not(tweet_3 <= tweet_4)
    assert not(tweet_3 >= tweet_4)
dataset/ETHPy150Open buckket/twtxt/tests/test_models.py/test_tweet_ordering/swapped operands of `<=`