Changes to io.py and socket.py by Christian Heimes.
- Replace all asserts by ValuleErrors or TypeErrors as appropriate.
- Add _checkReadable, _checkWritable methods; these check self.closed too.
- Add a test that everything exported by io.py exists, and is either
  an exception or an IOBase instance (except for the open function).
- Default buffering to 1 if isatty() (I had to tweak this to enforce
  the *default* bit -- GvR).
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 656711f..fe2d326 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -740,11 +740,26 @@
 
 # XXX Tests for open()
 
+class MiscIOTest(unittest.TestCase):
+
+    def testImport__all__(self):
+        for name in io.__all__:
+            obj = getattr(io, name, None)
+            self.assert_(obj is not None, name)
+            if name == "open":
+                continue
+            elif "error" in name.lower():
+                self.assert_(issubclass(obj, Exception), name)
+            else:
+                self.assert_(issubclass(obj, io.IOBase))
+
+
 def test_main():
     test_support.run_unittest(IOTest, BytesIOTest, StringIOTest,
                               BufferedReaderTest,
                               BufferedWriterTest, BufferedRWPairTest,
-                              BufferedRandomTest, TextIOWrapperTest)
+                              BufferedRandomTest, TextIOWrapperTest,
+                              MiscIOTest)
 
 if __name__ == "__main__":
     unittest.main()