def test_search_with_float_score_modifier(self):
        """Run search queries and compare the results with the stored results."""
        self.logger.info(f"Running test_search on {self.__class__.__name__}")
        stored_results = self.load_results_from_file()
        test_failures = [] #this stores the failures in the subtests. These failures could be assertion errors or any other types of exceptions.

        for index in self.indexes_to_test_on:
            index_name = index['indexName']
            try:
                result = self.client.index(index_name).search(
                    q="",
                    score_modifiers={
                        "add_to_score": [{"field_name": "popularity", "weight": 2}],
                    }
                )
                self.assertEqual(stored_results[index_name]["popularity"].get("hits"), result.get("hits"))
            except Exception as e:
                test_failures.append((index_name, traceback.format_exc()))

        if test_failures:
            failure_message = "\n".join([
                f"Failure in idx: {idx} : {error}"
                for idx, error in test_failures
            ])
            self.fail(f"Some subtests failed:\n{failure_message}")
Run search queries and compare the results with the stored results.
tests/compatibility_tests/search/test_search_with_score_modifiers.py