sys.spam

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 7

Example 1

Project: TrustRouter Source File: test_builtin.py
Function: test_del_attr
    def test_delattr(self):
        sys.spam = 1
        delattr(sys, 'spam')
        self.assertRaises(TypeError, delattr)

Example 2

Project: TrustRouter Source File: test_builtin.py
Function: test_set_attr
    def test_setattr(self):
        setattr(sys, 'spam', 1)
        self.assertEqual(sys.spam, 1)
        self.assertRaises(TypeError, setattr, sys, 1, 'spam')
        self.assertRaises(TypeError, setattr)