def test_actor_methods():
    actor1 = Actor("Angelina Jolie")
    assert actor1.__repr__() == "<Actor Angelina Jolie>"
    actor2 = Actor("")
    assert actor2.actor_full_name == None
    actor3 = Actor(324)
    assert actor3.actor_full_name == None
    actor4 = Actor("Dylan Yates")
    assert actor4.__eq__(actor1) == False
    assert actor4.__eq__(actor4) == True
    assert actor1.__lt__(actor4) == True
    assert actor1.__lt__(actor1) == False
    assert actor4.__lt__(actor1) == False
    assert hash(actor4) == hash(actor4)
    assert hash(actor1) != hash(actor4)
Beispiel #2
0
def test_actor_eq_function():
    actor1 = Actor("Steve Carell")
    actor2 = Actor("Steve Carell")
    assert actor1.__eq__(actor2) is True