@freeze_time("2012-01-14")
def test_subtraction():
    now = datetime.datetime.now()
    before = now - datetime.timedelta(days=1)
    other_before = now - relativedelta(days=1)
    how_long = now - before
    assert utils.is_fake_datetime(before)
    assert utils.is_fake_datetime(other_before)
    assert isinstance(how_long, datetime.timedelta)

    today = datetime.date.today()
    yesterday = today - datetime.timedelta(days=1)
    other_yesterday = today - relativedelta(days=1)
    how_long = today - yesterday
    assert utils.is_fake_date(yesterday)
    assert utils.is_fake_date(other_yesterday)
    assert isinstance(how_long, datetime.timedelta)
dataset/ETHPy150Open spulec/freezegun/tests/test_operations.py/test_subtraction/original