Ticket #16514: tests.diff

File tests.diff, 556 bytes (added by Kiran Busi, 13 years ago)

Test to check if a number is nan

  • tests/regressiontests/defaultfilters/tests.py

    diff -r 548df236b2cc tests/regressiontests/defaultfilters/tests.py
    a b  
    4747        nan = pos_inf / pos_inf
    4848        self.assertEqual(floatformat(nan), unicode(nan))
    4949
     50        #Test nan
     51        def test_isnan(self):
     52            self.assertTrue(math.isnan(nan))
     53
    5054        class FloatWrapper(object):
    5155            def __init__(self, value):
    5256                self.value = value
Back to Top