From 6b70ac0fa055fceac4e573a6e2a11234af710890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Sat, 16 Dec 2023 21:05:26 +0100 Subject: [PATCH] Remove benchmark for format (#779) --- tests/benchmarks/test_format.py | 39 --------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 tests/benchmarks/test_format.py diff --git a/tests/benchmarks/test_format.py b/tests/benchmarks/test_format.py deleted file mode 100644 index e4e7eac7..00000000 --- a/tests/benchmarks/test_format.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING - - -if TYPE_CHECKING: - from pytest_benchmark.fixture import ( # type: ignore[import-untyped] - BenchmarkFixture, - ) - -import pendulum - -from pendulum.formatting.formatter import Formatter - - -def test_format(benchmark: BenchmarkFixture) -> None: - f = Formatter() - d = pendulum.datetime(2016, 8, 28, 7, 3, 6, 123456) - - @benchmark # type: ignore[misc] - def benchmark_() -> None: - f.format(d, "S") - f.format(d, "SS") - f.format(d, "SSS") - f.format(d, "SSSS") - f.format(d, "SSSSS") - f.format(d, "SSSSSS") - - f.format(d, "zz") - f.format(d, "z") - f.format(d, "ZZ") - f.format(d, "Z") - - f.format(d, "LT") - f.format(d, "LTS") - f.format(d, "L") - f.format(d, "LL") - f.format(d, "LLL") - f.format(d, "LLLL")