Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Python/Sympy/sympy/utilities/tests/     Datei vom 6.10.2026 mit Größe 372 B image not shown  

Quelle  test_timeutils.py   Sprache: Python

 

"""Tests for simple tools for timing functions' execution. """
from __future__ import annotations

from sympy.utilities.timeutils import timed

def test_timed():
    result = timed(lambda: 1 + 1, limit=100000)
    assert result[0] == 100000 and result[3] == "ns", str(result)

    result = timed("1 + 1", limit=100000)
    assert result[0] == 100000 and result[3] == "ns"

Messung
CHZG
839810093

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland