def test_full_loop(self):
        results = clusterfinder.run_on_record(self.record, None, self.config)
        old_areas = len(results.areas)

        json_string = json.dumps(results.to_json())
        regenned = clusterfinder.regenerate_previous_results(json.loads(json_string), self.record, self.config)
        assert len(regenned.areas) == old_areas
        for old, new in zip(results.areas, regenned.areas):
            assert old.location == new.location
            self.assertAlmostEqual(old.probability, new.probability, places=6)
Пример #2
0
 def regen(self, results):
     return clusterfinder.regenerate_previous_results(
         results, self.record, self.config)