Thrift: Python test improvements.

Summary:
- Add a serialization test for forwards/backwards compatibility.
- Hook the Python tests up to "make check".
- Miscellaneous changes to the Python tests.

Reviewed By: mcslee

Test Plan: Ran the test.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665480 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/py/TestEof.py b/test/py/TestEof.py
old mode 100644
new mode 100755
index a23a441..7dd964f
--- a/test/py/TestEof.py
+++ b/test/py/TestEof.py
@@ -92,10 +92,11 @@
     self.eofTestHelper(TBinaryProtocol.TBinaryProtocolAcceleratedFactory())
     self.eofTestHelperStress(TBinaryProtocol.TBinaryProtocolAcceleratedFactory())
 
-suite = unittest.TestSuite()
-loader = unittest.TestLoader()
+def suite():
+  suite = unittest.TestSuite()
+  loader = unittest.TestLoader()
+  suite.addTest(loader.loadTestsFromTestCase(TestEof))
+  return suite
 
-suite.addTest(loader.loadTestsFromTestCase(TestEof))
-
-testRunner = unittest.TextTestRunner(verbosity=2)
-testRunner.run(suite)
+if __name__ == "__main__":
+  unittest.main(defaultTest="suite", testRunner=unittest.TextTestRunner(verbosity=2))