Example #1
0
 def test_seterr(self):
     existing = seterr(empty='warn')
     self.assertEqual(runtime_ep._state['empty'], 'warn')
     self.assertNotEqual(runtime_ep._state['empty'], existing)
     seterr(empty=existing['empty'])
     self.assertNotEqual(runtime_ep._state['empty'], 'warn')
     self.assertEqual(runtime_ep._state, existing)
Example #2
0
 def test_geterr(self):
     state = geterr()
     self.assertEqual(state, runtime_ep._state)
     old = seterr(all='call')
     self.assertNotEqual(geterr(), state)
     seterr(**old)