def test_mailmap_lookup(self): with open(os.path.join(self.repo.path, '.mailmap'), 'wb') as f: f.write(b"""\ Jelmer Vernooij <*****@*****.**> """) self.assertEqual( b'Jelmer Vernooij <*****@*****.**>', porcelain.check_mailmap( self.repo, b'Jelmer Vernooij <*****@*****.**>'))
def run(self, args): parser = optparse.OptionParser() options, args = parser.parse_args(args) for arg in args: canonical_identity = porcelain.check_mailmap('.', arg) print(canonical_identity)
def test_no_mailmap(self): self.assertEqual( b'Jelmer Vernooij <*****@*****.**>', porcelain.check_mailmap( self.repo, b'Jelmer Vernooij <*****@*****.**>'))