Statistics: increase CSV field size limit
# along with Pynguin. If not, see <https://www.gnu.org/licenses/>.
"""Provides an interface for a statistics writer."""
import csv
+import ctypes
import logging
from abc import ABCMeta, abstractmethod
from dataclasses import dataclass
@@ -48,6 +49,9 @@ class CSVStatisticsBackend(AbstractStatisticsBackend):
_logger = logging.getLogger(__name__)
+ def __init__(self) -> None:
+ csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
+
def write_data(self, data: Dict[str, OutputVariable]) -> None:
try:
output_dir = self._get_report_dir()
