m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
337 B

6 months ago
  1. """Tests for simple tools for timing functions' execution. """
  2. from sympy.utilities.timeutils import timed
  3. def test_timed():
  4. result = timed(lambda: 1 + 1, limit=100000)
  5. assert result[0] == 100000 and result[3] == "ns", str(result)
  6. result = timed("1 + 1", limit=100000)
  7. assert result[0] == 100000 and result[3] == "ns"