def test_eq_instances_not_equal():
    p1 = Person("John", None, "Adams")
    p2 = Person("John", "Quincy", "Adams")

    assert p1 != p2  # calls Person.__ne__()
def test_eq_new_instances_equal_fail():
    p1 = Person(None, None, None)
    p2 = Person(None, None, None)

    assert p1 != p2  # calls Person.__eq__()
def test_eq_instances_equal():
    p1 = Person("John", "Quincy", "Adams")
    p2 = Person("John", "Quincy", "Adams")

    assert p1 == p2  # calls Person.__eq__()
def test_init():
    person = Person("John", "Quincy", "Adams")

    assert ("John", "Quincy", "Adams") == \
           (person.first_name, person.middle_name, person.last_name)
 def test_eq_new_instances_equal(self):
     p1 = Person(None, None, None)
     p2 = Person(None, None, None)
     self.assertEqual(p1, p2)  # assertEqual() calls p1.__eq__(p2)
 def test_eq_instances_not_equal(self):
     p1 = Person("John", None, "Adams")
     p2 = Person("John", "Quincy", "Adams")
     self.assertTrue(p1 != p2)
    def test_init(self):
        person = Person("John", "Quincy", "Adams")

        self.assertEqual("John", person.first_name)
        self.assertEqual("Quincy", person.middle_name)
        self.assertEqual("Adams", person.last_name)