Ejemplo n.º 1
0
 def test_match_no_correspondence(self):
     low_res = ['/path/to/low/res/DSC00003.jpg',
                '/path/to/low/res/DSC00004.jpg']
     hi_res = []
     match = [[], []]
     
     self.assertEqual(match_photos(low_res, hi_res), match)
Ejemplo n.º 2
0
 def _test_big_input(self):
     _max = 100000
     _common = sample(xrange(_max), 200)
     low_res = ['/path/to/low/res/DSC%05d.jpg' % i for i in _common]
     hi_res = ['/path/to/hi/res/DSC%05d.jpg' % i for i in xrange(_max)]
     match = [['/path/to/hi/res/DSC%05d.jpg' % i] for i in _common]
     
     self.assertEqual(match_photos(low_res, hi_res), match)
Ejemplo n.º 3
0
 def test_match_some_correspondence(self):
     low_res = ['/path/to/low/res/DSC00003.jpg',
                '/path/to/low/res/DSC00004.jpg']
     hi_res = ['/path/to/hi/res/DSC00004.jpg',
               '/path/to/hi/res/DSC00005.jpg',
               '/path/to/hi/res/DSC00006.jpg',
               '/path/to/hi/res/DSC00007.jpg',
               '/path/to/hi/res/DSC00008.jpg',
               '/path/to/hi/res/DSC00009.jpg']
     match = [[], ['/path/to/hi/res/DSC00004.jpg']]
     
     self.assertEqual(match_photos(low_res, hi_res), match)