diff options
Diffstat (limited to 'Lib/test/test_operator.py')
| -rw-r--r-- | Lib/test/test_operator.py | 11 | 
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_operator.py b/Lib/test/test_operator.py index 611e427..422a3cb 100644 --- a/Lib/test/test_operator.py +++ b/Lib/test/test_operator.py @@ -215,6 +215,17 @@ class OperatorTestCase(unittest.TestCase):      def test_bitwise_xor(self):          self.failUnless(operator.xor(0xb, 0xc) == 0x7) +    def test_is(self): +        a = b = 'xyzpdq' +        c = a[:3] + b[3:] +        self.failUnless(operator.is_(a, b)) +        self.failIf(operator.is_(a,c)) + +    def test_is_not(self): +        a = b = 'xyzpdq' +        c = a[:3] + b[3:] +        self.failIf(operator.is_not(a, b)) +        self.failUnless(operator.is_not(a,c))  def test_main():      test_support.run_unittest(OperatorTestCase)  | 
