Exemple #1
0
def test_retrive_collision():
    hashtable = Hashtable()
    hashtable.add("fried", "chicken")
    hashtable.add("fired", "the employee")
    actual = [hashtable.get("fried"), hashtable.get("fired")]
    expect = ["chicken", "the employee"]
    assert actual == expect
Exemple #2
0
def test_get_none_value():
    hashtable = Hashtable()
    hashtable.add('length', 174)
    actual = hashtable.get('wight')
    expect = None
    assert actual == expect
Exemple #3
0
def test_get_value():
    hashtable = Hashtable()
    hashtable.add('length', 174)
    actual = hashtable.get('length')
    expect = 174
    assert actual == expect