summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_array.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_array.py')
-rw-r--r--Lib/test/test_array.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index d67f919..e9218f3 100644
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -1342,6 +1342,16 @@ class FPTest(NumberTest):
def assertEntryEqual(self, entry1, entry2):
self.assertAlmostEqual(entry1, entry2)
+ def test_nan(self):
+ a = array.array(self.typecode, [float('nan')])
+ b = array.array(self.typecode, [float('nan')])
+ self.assertIs(a != b, True)
+ self.assertIs(a == b, False)
+ self.assertIs(a > b, False)
+ self.assertIs(a >= b, False)
+ self.assertIs(a < b, False)
+ self.assertIs(a <= b, False)
+
def test_byteswap(self):
a = array.array(self.typecode, self.example)
self.assertRaises(TypeError, a.byteswap, 42)