示例#1
0
def test_scoresheet():
    sheet = Scoresheet()
    t = ('a', 'b')
    sheet[t] = 5
    assert_equal(len(sheet), 1)
    assert_equal(sheet.items(), [(Pair('a', 'b'), 5.0)])
    assert_equal(sheet[t], 5.0)
    del sheet[t]
    assert_equal(len(sheet), 0)
示例#2
0
def test_scoresheet():
    sheet = Scoresheet()
    t = ('a', 'b')
    sheet[t] = 5
    assert_equal(len(sheet), 1)
    assert_equal(list(sheet.items()), [(Pair('a', 'b'), 5.0)])
    assert_equal(sheet[t], 5.0)
    del sheet[t]
    assert_equal(len(sheet), 0)
示例#3
0
def test_scoresheet():
    sheet = Scoresheet()
    t = ("a", "b")
    sheet[t] = 5
    assert len(sheet) == 1
    assert list(sheet.items()) == [(Pair("a", "b"), 5.0)]
    assert sheet[t] == 5.0
    del sheet[t]
    assert len(sheet) == 0