def assertIsNaN(self, value, msg=None):
    """
        Fail if provided value is not NaN
        """
standardMsg = '%s is not NaN' % str(value)
try:
    if not math.isnan(value):
        self.fail(self._formatMessage(msg, standardMsg))
except:
    self.fail(self._formatMessage(msg, standardMsg))

def assertIsNotNaN(self, value, msg=None):
    pass
Как проверить, является ли значение nan в unittest?