Skip to content

Commit aa510b9

Browse files
committed
Fix import
1 parent 3001a55 commit aa510b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/_pytest/python_api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,12 +541,11 @@ def __repr__(self) -> str:
541541
else:
542542
abs_ = self.abs
543543

544+
tol_str = "???"
544545
if rel is not None and Decimal("1e-3") <= rel <= Decimal("1e3"):
545546
tol_str = f"{rel:.1e}"
546547
elif abs_ is not None:
547548
tol_str = f"{abs_:.1e}"
548-
else:
549-
tol_str = "???"
550549

551550
return f"{self.expected} ± {tol_str}"
552551

testing/python/approx.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from __future__ import annotations
33

44
from contextlib import contextmanager
5+
import decimal
56
from decimal import Decimal
67
from fractions import Fraction
78
from math import sqrt

0 commit comments

Comments
 (0)