Skip to content

Commit 90c0d58

Browse files
committed
fmt of test_docs
1 parent 828f79b commit 90c0d58

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tests/test_docs.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,16 @@ def check_output(self, want, got, optionflags):
4949
# Try float-tolerant comparison
5050
try:
5151
# Extract floats from both strings
52-
want_floats = [float(x) for x in want.replace(",", " ").split() if x.replace('.', '', 1).replace('-', '', 1).isdigit()]
53-
got_floats = [float(x) for x in got.replace(",", " ").split() if x.replace('.', '', 1).replace('-', '', 1).isdigit()]
52+
want_floats = [
53+
float(x)
54+
for x in want.replace(",", " ").split()
55+
if x.replace('.', '', 1).replace('-', '', 1).isdigit()
56+
]
57+
got_floats = [
58+
float(x)
59+
for x in got.replace(",", " ").split()
60+
if x.replace('.', '', 1).replace('-', '', 1).isdigit()
61+
]
5462

5563
if len(want_floats) != len(got_floats):
5664
return False

0 commit comments

Comments
 (0)