def test_nearest_dark_pairs(self): """Uses dataset with two dark images, and known relations to the science images Image info: == DARKS -- ./V47_20141104053006639865.fits DATE-OBS= '2014-11-04T05:30:06.639865' ./V47_20141104054035677809.fits DATE-OBS= '2014-11-04T05:40:35.677809' SCIENCES -- ./V47_20141104053025349425.fits DATE-OBS= '2014-11-04T05:30:25.349425' ./V47_20141104053752110943.fits DATE-OBS= '2014-11-04T05:37:52.110943' """ test_data_path = path.join( __pkg_root__, 'datasets', 'tests', 'ordering_dataset' ) pp = Preprocessor(test_data_path) expected = { 'V47_20141104053025349425': 'V47_20141104053006639865', 'V47_20141104053752110943': 'V47_20141104054035677809' } result = pp.nearest_dark_pairings() self.assertDictEqual(expected, result)