Ejemplo n.º 1
0
def test_get_lastbday():
    dt = datetime(2017, 11, 30)
    assert dt.weekday() == 3  # i.e. this is a business day
    assert liboffsets.get_lastbday(dt.year, dt.month) == 30

    dt = datetime(1993, 10, 31)
    assert dt.weekday() == 6  # i.e. this is not a business day
    assert liboffsets.get_lastbday(dt.year, dt.month) == 29
Ejemplo n.º 2
0
def test_get_lastbday():
    dt = datetime(2017, 11, 30)
    assert dt.weekday() == 3  # i.e. this is a business day
    assert liboffsets.get_lastbday(dt.year, dt.month) == 30

    dt = datetime(1993, 10, 31)
    assert dt.weekday() == 6  # i.e. this is not a business day
    assert liboffsets.get_lastbday(dt.year, dt.month) == 29
Ejemplo n.º 3
0
def test_get_last_bday(dt, exp_week_day, exp_last_day):
    assert dt.weekday() == exp_week_day
    assert liboffsets.get_lastbday(dt.year, dt.month) == exp_last_day