MCPcopy
hub / github.com/pytest-dev/pytest / as_utc

Method as_utc

src/_pytest/timing.py:49–51  ·  view source on GitHub ↗

Instant as UTC datetime.

(self)

Source from the content-addressed store, hash-verified

47 return Duration(start=self, stop=Instant())
48
49 def as_utc(self) -> datetime:
50 """Instant as UTC datetime."""
51 return datetime.fromtimestamp(self.time, timezone.utc)
52
53
54@dataclasses.dataclass(frozen=True)

Callers 1

pytest_sessionfinishMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected