Add tests for getattr() and hasattr() with non-string args
diff --git a/Lib/test/test_b2.py b/Lib/test/test_b2.py
index cfc461c..ae07f5b 100644
--- a/Lib/test/test_b2.py
+++ b/Lib/test/test_b2.py
@@ -205,6 +205,12 @@
 import sys
 setattr(sys, 'spam', 1)
 if sys.spam != 1: raise TestFailed, 'setattr(sys, \'spam\', 1)'
+try:
+    setattr(sys, 1, 'spam')
+except TypeError:
+    pass
+else:
+    raise TestFailed, "setattr(sys, 1, 'spam') should raise exception"
 
 print 'str'
 if str('') != '': raise TestFailed, 'str(\'\')'