def test_mergecontacts(self): path_email = self.create_temp_file(self.CONTACTS_EMAIL) path_phone = self.create_temp_file(self.CONTACTS_PHONE) path_snailmail = self.create_temp_file(self.CONTACTS_SNAILMAIL) result_prefix = self.create_temp_file('') mergecontacts.run([ '--input_email=%s' % path_email, '--input_phone=%s' % path_phone, '--input_snailmail=%s' % path_snailmail, '--output_tsv=%s.tsv' % result_prefix, '--output_stats=%s.stats' % result_prefix], assert_results=(2, 1, 3)) with open_shards('%s.tsv-*-of-*' % result_prefix) as f: contents = f.read() self.assertEqual(self.EXPECTED_TSV, self.normalize_tsv_results(contents))
def test_mergecontacts(self): path_email = self.create_temp_file(self.CONTACTS_EMAIL) path_phone = self.create_temp_file(self.CONTACTS_PHONE) path_snailmail = self.create_temp_file(self.CONTACTS_SNAILMAIL) result_prefix = self.create_temp_file('') mergecontacts.run([ '--input_email=%s' % path_email, '--input_phone=%s' % path_phone, '--input_snailmail=%s' % path_snailmail, '--output_tsv=%s.tsv' % result_prefix, '--output_stats=%s.stats' % result_prefix], assert_results=(2, 1, 3)) with open('%s.tsv-00000-of-00001' % result_prefix) as f: contents = f.read() self.assertEqual(self.EXPECTED_TSV, self.normalize_tsv_results(contents))