From 42f5fbc77e75ad37be63efd69c59f574857ff63a Mon Sep 17 00:00:00 2001 From: Adria Montoto <75563346+adriamontoto@users.noreply.github.com> Date: Fri, 3 Jan 2025 11:53:50 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20add=20coverage=20pragma?= =?UTF-8?q?=20comments=20in=20DatetimeMother=20and=20NameMother=20for=20cl?= =?UTF-8?q?arity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mothers/additional_types/datetime_mother.py | 2 +- object_mother_pattern/mothers/name_mother.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/object_mother_pattern/mothers/additional_types/datetime_mother.py b/object_mother_pattern/mothers/additional_types/datetime_mother.py index af1d2f0..bb96d52 100644 --- a/object_mother_pattern/mothers/additional_types/datetime_mother.py +++ b/object_mother_pattern/mothers/additional_types/datetime_mother.py @@ -182,6 +182,6 @@ def __force_utc(cls, date: datetime) -> datetime: datetime: Timezone-aware datetime. """ if date.tzinfo is None: - date = date.replace(tzinfo=UTC) + date = date.replace(tzinfo=UTC) # pragma: no cover return date diff --git a/object_mother_pattern/mothers/name_mother.py b/object_mother_pattern/mothers/name_mother.py index b049b8f..6ece0bc 100644 --- a/object_mother_pattern/mothers/name_mother.py +++ b/object_mother_pattern/mothers/name_mother.py @@ -64,7 +64,7 @@ def create(cls, *, value: str | None = None, min_length: int = 3, max_length: in name = cls._random().name() while len(name) < length: - name += cls._random().name() + name += cls._random().name() # pragma: no cover name = name[:length] if name != name.strip():