예제 #1
0
파일: test_activity.py 프로젝트: groves/tic
def test_multiple_names():
    act = get_base()
    matches = Activity.locate(act.start, datetime.now(), ["Working", "Horking"])
    eq_(2, len(matches))
예제 #2
0
파일: test_activity.py 프로젝트: groves/tic
def test_single_letter_missing():
    act = get_base()
    matches = Activity.locate(act.start, datetime.now(), ["orking"])
    eq_(0, len(matches))
예제 #3
0
파일: test_activity.py 프로젝트: groves/tic
def test_earlier_start():
    act = get_base()
    matches = Activity.locate(act.start - timedelta(days=2), datetime.now(), ["Working on tic"])
    eq_(2, len(matches))
    assert act.key() in set((m.key() for m in matches))
예제 #4
0
파일: test_activity.py 프로젝트: groves/tic
def test_same_ending():
    act = get_base()
    matches = Activity.locate(act.start, datetime.now(), ["on tic"])
    eq_(2, len(matches))
    assert act.key() in set((m.key() for m in matches))
예제 #5
0
파일: test_activity.py 프로젝트: groves/tic
def test_case_insensitive():
    act = get_base()
    matches = Activity.locate(act.start, datetime.now(), ["working"])
    eq_(1, len(matches))
예제 #6
0
파일: test_activity.py 프로젝트: groves/tic
def test_tag():
    act = get_base()
    matches = Activity.locate(tags=["tic"])
    eq_(3, len(matches))
    assert act.key() in set((m.key() for m in matches))
예제 #7
0
파일: test_activity.py 프로젝트: groves/tic
def test_single_letter_difference():
    act = get_base()
    matches = Activity.locate(act.start, datetime.now(), ["Working"])
    eq_(1, len(matches))
    eq_(act.key(), iter(matches).next().key())