How to check if value is nan in unittest? December 3, 2023 by Tarik I came up with assertTrue(math.isnan(nan_value))