Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_eq_dev():
d1 = Developer("Davide", "s.d@gmail.com")
d2 = Developer("Davide", "s.d@gmail.com")
d3 = Developer("Davide", "s.d@gmail.eu")
d4 = None
assert d1 == d1
assert d1 == d2
assert d1 != d3
assert d1 != d4
def test_eq_dev():
d1 = Developer("Davide", "s.d@gmail.com")
d2 = Developer("Davide", "s.d@gmail.com")
d3 = Developer("Davide", "s.d@gmail.eu")
d4 = None
assert d1 == d1
assert d1 == d2
assert d1 != d3
assert d1 != d4
def test_eq_dev():
d1 = Developer("Davide", "s.d@gmail.com")
d2 = Developer("Davide", "s.d@gmail.com")
d3 = Developer("Davide", "s.d@gmail.eu")
d4 = None
assert d1 == d1
assert d1 == d2
assert d1 != d3
assert d1 != d4
def __eq__(self, other):
if not isinstance(other, Developer):
return NotImplemented
elif self is other:
return True
else:
return self.__dict__ == other.__dict__
def committer(self) -> Developer:
"""
Return the committer of the commit as a Developer object.
:return: committer
"""
return Developer(self._c_object.committer.name,
self._c_object.committer.email)
def author(self) -> Developer:
"""
Return the author of the commit as a Developer object.
:return: author
"""
return Developer(self._c_object.author.name,
self._c_object.author.email)