Here are the examples of the python api sys.spam taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
0
Example 1
def test_delattr(self):
sys.spam = 1
delattr(sys, 'spam')
self.assertRaises(TypeError, delattr)
0
Example 2
def test_setattr(self):
setattr(sys, 'spam', 1)
self.assertEqual(sys.spam, 1)
self.assertRaises(TypeError, setattr, sys, 1, 'spam')
self.assertRaises(TypeError, setattr)