diff options
Diffstat (limited to 'Lib/test/test_operator.py')
-rw-r--r-- | Lib/test/test_operator.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_operator.py b/Lib/test/test_operator.py index d50306b7f1e..b9b8f155826 100644 --- a/Lib/test/test_operator.py +++ b/Lib/test/test_operator.py @@ -153,6 +153,11 @@ class OperatorTestCase: self.assertRaises(ZeroDivisionError, operator.countOf, BadIterable(), 1) self.assertEqual(operator.countOf([1, 2, 1, 3, 1, 4], 3), 1) self.assertEqual(operator.countOf([1, 2, 1, 3, 1, 4], 5), 0) + # is but not == + nan = float("nan") + self.assertEqual(operator.countOf([nan, nan, 21], nan), 2) + # == but not is + self.assertEqual(operator.countOf([{}, 1, {}, 2], {}), 2) def test_delitem(self): operator = self.module |