def test_person_definition(): """Test Person class.""" p1 = Person('Jack', 'Jackson', 19) p3 = Person('Igor', 'Smirnov', 33) assert p3.age == 33 assert p1.__repr__() == p1.full_name assert p1.bank_account is None with pytest.raises(PersonError): assert Person("aa", "BB", -4)
def test_person(): """Test person class.""" person1 = Person("Ellina", "Gedrojets", 18) person2 = Person("Robert", "Soidla", 19) assert person2.age == 19 assert person2.__repr__() == person2.full_name assert person1.bank_account is None with pytest.raises(PersonError): assert Person("Ellina", "Mailna", -20)