def test_up_to_date(self): distribution = RemoteDistribution( self.mock_repo(), '../../packages/source/p/pkgsync/pkgsync-0.1.0.tar.gz#md5=%s' % self.empty_digest, 'pkgsync', ) self.assertEqual(RemoteDistribution.diff([distribution], [distribution]), [])
def test_tgz_and_zip(self): repo = self.mock_repo() tgz_d = RemoteDistribution( repo, '../../packages/source/p/pkgsync/pkgsync-0.1.0.tar.gz#md5=%s' % self.empty_digest, 'pkgsync', ) zip_d = RemoteDistribution( repo, '../../packages/source/p/pkgsync/pkgsync-0.1.0.zip#md5=%s' % self.empty_digest, 'pkgsync', ) self.assertEqual(RemoteDistribution.diff([zip_d, tgz_d], [tgz_d]), [zip_d])
def test_empty_diff(self): self.assertEqual(RemoteDistribution.diff([], []), [])