Save current results to JSON file.
(self)
| 144 | self._save_to_file() |
| 145 | |
| 146 | def _save_to_file(self): |
| 147 | """Save current results to JSON file.""" |
| 148 | try: |
| 149 | with open(self.filepath, 'w', encoding='utf-8') as f: |
| 150 | json.dump(self.results_data, f, indent=2, ensure_ascii=False) |
| 151 | except Exception as e: |
| 152 | logger.error(f"Failed to save results to {self.filepath}: {e}") |
| 153 | |
| 154 | def get_file_path(self) -> str: |
| 155 | """Get the path to the results file.""" |
no test coverage detected