def test_returns_consistent_id_for_the_same_analysis(self): first = an.analysis_id(self.some_path) second = an.analysis_id(self.some_path) self.assertEqual(first, second)
def test_returns_different_id_for_different_analysis(self): first = an.analysis_id(self.some_path) second = an.analysis_id(self.other_path) self.assertNotEqual(first, second)
def test_resolves_analysis_path_by_its_id(self): sample_path = os.path.join(ROOT, 'data', 'peptides-1', 'tSNE', 'blah') sample_id = an.analysis_id(sample_path) resolved = an.find_analysis_by_id('tSNE', sample_id) self.assertEqual(sample_path, resolved)