We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pytest.warns
1 parent 1cc8f71 commit 2135a58Copy full SHA for 2135a58
scripts/test.py
@@ -43,6 +43,7 @@
43
import time
44
import platform
45
import collections
46
+import warnings
47
from typing import Dict, List
48
49
import tabulate
@@ -1488,9 +1489,9 @@ def compute_with_threads(threads: int) -> float:
1488
1489
1490
# Warn if multi-threaded execution is slower than the baseline
1491
if baseline_duration < multi_duration:
- pytest.warns(
1492
- UserWarning,
+ warnings.warn(
1493
f"{num_threads}-threaded execution took longer than 2-threaded baseline: {multi_duration:.2f}s vs {baseline_duration:.2f}s",
1494
+ UserWarning,
1495
)
1496
1497
0 commit comments