@@ -78,7 +78,7 @@ def _yield_comparisons(self, actual):
78
78
79
79
class ApproxNumpy (ApproxBase ):
80
80
"""
81
- Perform approximate comparisons for numpy arrays .
81
+ Perform approximate comparisons where the expected value is numpy array .
82
82
"""
83
83
84
84
def __repr__ (self ):
@@ -132,8 +132,8 @@ def _yield_comparisons(self, actual):
132
132
133
133
class ApproxMapping (ApproxBase ):
134
134
"""
135
- Perform approximate comparisons for mappings where the values are numbers
136
- (the keys can be anything).
135
+ Perform approximate comparisons where the expected value is a mapping with
136
+ numeric values (the keys can be anything).
137
137
"""
138
138
139
139
def __repr__ (self ):
@@ -154,7 +154,8 @@ def _yield_comparisons(self, actual):
154
154
155
155
class ApproxSequence (ApproxBase ):
156
156
"""
157
- Perform approximate comparisons for sequences of numbers.
157
+ Perform approximate comparisons where the expected value is a sequence of
158
+ numbers.
158
159
"""
159
160
160
161
def __repr__ (self ):
@@ -176,7 +177,7 @@ def _yield_comparisons(self, actual):
176
177
177
178
class ApproxScalar (ApproxBase ):
178
179
"""
179
- Perform approximate comparisons for single numbers only .
180
+ Perform approximate comparisons where the expected value is a single number .
180
181
"""
181
182
182
183
DEFAULT_ABSOLUTE_TOLERANCE = 1e-12
@@ -290,6 +291,9 @@ def set_default(x, default):
290
291
291
292
292
293
class ApproxDecimal (ApproxScalar ):
294
+ """
295
+ Perform approximate comparisons where the expected value is a decimal.
296
+ """
293
297
from decimal import Decimal
294
298
295
299
DEFAULT_ABSOLUTE_TOLERANCE = Decimal ("1e-12" )
0 commit comments