File: test_ulid.py

package info (click to toggle)
python-ulid-transform 1.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 360 kB
  • sloc: python: 695; cpp: 476; sh: 5; makefile: 4
file content (19 lines) | stat: -rw-r--r-- 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from pytest_codspeed import BenchmarkFixture

from ulid_transform import ulid_at_time, ulid_at_time_bytes, ulid_now


def test_ulid_now(benchmark: BenchmarkFixture) -> None:
    benchmark(ulid_now)


def test_ulid_at_time(benchmark: BenchmarkFixture) -> None:
    @benchmark
    def _():
        ulid_at_time(1)


def test_ulid_at_time_bytes(benchmark: BenchmarkFixture) -> None:
    @benchmark
    def _():
        ulid_at_time_bytes(1)