Пример #1
0
def test_earlylarge():
    result = break_day(DAY_EARLY, BUSY_LARGE)
    print("Result of DAY_EARLY and BUSY_LARGE: {}".format(result))
    assert result == [{
        'start': '2000-01-01T04:00:00-0000',
        'end': '2000-01-01T06:00:00-0000'
    }]
Пример #2
0
def test_latelarge():
    result = break_day(DAY_LATE, BUSY_LARGE)
    print("Result of DAY_LATE and BUSY_LARGE: {}".format(result))
    assert result == [{
        'start': '2000-01-01T18:00:00-0000',
        'end': '2000-01-01T19:00:00-0000'
    }]
Пример #3
0
def test_wholesmall():
    result = break_day(DAY_WHOLE, BUSY_SMALL)
    print("Result of DAY_WHOLE and BUSY_SMALL: {}".format(result))
    assert result == [{
        'start': '2000-01-01T02:00:00-0000',
        'end': '2000-01-01T10:00:00-0000'
    }, {
        'start': '2000-01-01T12:00:00-0000',
        'end': '2000-01-01T22:00:00-0000'
    }]
Пример #4
0
def test_latefrequent():
    result = break_day(DAY_LATE, BUSY_FREQUENT)
    print("Result of DAY_LATE and BUSY_FREQUENT: {}".format(result))
    assert result == [{
        'start': '2000-01-01T15:00:00-0000',
        'end': '2000-01-01T16:00:00-0000'
    }, {
        'start': '2000-01-01T18:00:00-0000',
        'end': '2000-01-01T19:00:00-0000'
    }]
Пример #5
0
def test_earlyfrequent():
    result = break_day(DAY_EARLY, BUSY_FREQUENT)
    print("Result of DAY_EARLY and BUSY_FREQUENT: {}".format(result))
    assert result == [{
        'start': '2000-01-01T04:00:00-0000',
        'end': '2000-01-01T06:00:00-0000'
    }, {
        'start': '2000-01-01T08:00:00-0000',
        'end': '2000-01-01T09:00:00-0000'
    }]
Пример #6
0
def test_wholelarge():
    result = break_day(DAY_WHOLE, BUSY_LARGE)
    print("Result of DAY_WHOLE and BUSY_LARGE: {}".format(result))
    assert result == [{
        'start': '2000-01-01T02:00:00-0000',
        'end': '2000-01-01T06:00:00-0000'
    }, {
        'start': '2000-01-01T18:00:00-0000',
        'end': '2000-01-01T22:00:00-0000'
    }]
Пример #7
0
def test_wholefrequent():
    result = break_day(DAY_WHOLE, BUSY_FREQUENT)
    print("Result of DAY_WHOLE and BUSY_FREQUENT: {}".format(result))
    assert result == [{
        'start': '2000-01-01T02:00:00-0000',
        'end': '2000-01-01T06:00:00-0000'
    }, {
        'start': '2000-01-01T08:00:00-0000',
        'end': '2000-01-01T09:00:00-0000'
    }, {
        'start': '2000-01-01T11:00:00-0000',
        'end': '2000-01-01T12:00:00-0000'
    }, {
        'start': '2000-01-01T14:00:00-0000',
        'end': '2000-01-01T16:00:00-0000'
    }, {
        'start': '2000-01-01T18:00:00-0000',
        'end': '2000-01-01T20:00:00-0000'
    }]
Пример #8
0
def test_latesmall():
    result = break_day(DAY_LATE, BUSY_SMALL)
    print("Result of DAY_LATE and BUSY_SMALL: {}".format(result, DAY_LATE))
    assert result == DAY_LATE
Пример #9
0
def test_earlysmall():
    result = break_day(DAY_EARLY, BUSY_SMALL)
    print("Result of DAY_EARLY and BUSY_SMALL: {}".format(result))
    assert result == DAY_EARLY
Пример #10
0
def test_wholefree():
    result = break_day(DAY_WHOLE, FREE)
    print("Result of DAY_WHOLE and FREE: {}".format(result))
    assert result == DAY_WHOLE
Пример #11
0
def test_latefree():
    result = break_day(DAY_LATE, FREE)
    print("Result of DAY_LATE and FREE: {}".format(result))
    assert result == DAY_LATE
Пример #12
0
def test_earlyfree():
    result = break_day(DAY_EARLY, FREE)
    print("Result of DAY_EARLY and FREE: {}".format(result))
    assert result == DAY_EARLY