Update tests for type_hints
diff --git a/test/py/Makefile.am b/test/py/Makefile.am
index e026077..b4be953 100644
--- a/test/py/Makefile.am
+++ b/test/py/Makefile.am
@@ -52,7 +52,11 @@
         gen-py-enum/ThriftTest/__init__.py \
         gen-py-enum/DebugProtoTest/__init__.py \
         gen-py-enum/DoubleConstantsTest/__init__.py \
-        gen-py-enum/Recursive/__init__.py
+        gen-py-enum/Recursive/__init__.py \
+        gen-py-type_hints/ThriftTest/__init__.py \
+        gen-py-type_hints/DebugProtoTest/__init__.py \
+        gen-py-type_hints/DoubleConstantsTest/__init__.py \
+        gen-py-type_hints/Recursive/__init__.py
 
 distdir:
 	$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -119,6 +123,12 @@
 	&& $(THRIFT) --gen py:enum -out gen-py-enum ../v0.16/$(notdir $<) \
 	|| $(THRIFT) --gen py:enum -out gen-py-enum $<
 
+gen-py-type_hints/%/__init__.py: ../%.thrift $(THRIFT)
+	test -d gen-py-type_hints || $(MKDIR_P) gen-py-type_hints
+	test ../v0.16/$(notdir $<) \
+	&& $(THRIFT) --gen py:type_hints -out gen-py-type_hints ../v0.16/$(notdir $<) \
+	|| $(THRIFT) --gen py:type_hints -out gen-py-type_hints $<
+
 clean-local:
 	$(RM) -r build
 	find . -type f \( -iname "*.pyc" \) | xargs rm -f
diff --git a/test/py/RunClientServer.py b/test/py/RunClientServer.py
index cb0decf..e6ad3a3 100755
--- a/test/py/RunClientServer.py
+++ b/test/py/RunClientServer.py
@@ -259,7 +259,7 @@
     parser = OptionParser()
     parser.add_option('--all', action="store_true", dest='all')
     parser.add_option('--genpydirs', type='string', dest='genpydirs',
-                      default='default,slots,oldstyle,no_utf8strings,dynamic,dynamicslots,enum',
+                      default='default,slots,oldstyle,no_utf8strings,dynamic,dynamicslots,enum,type_hints',
                       help='directory extensions for generated code, used as suffixes for \"gen-py-*\" added sys.path for individual tests')
     parser.add_option("--port", type="int", dest="port", default=9090,
                       help="port number for server to listen on")
diff --git a/test/py/generate.cmake b/test/py/generate.cmake
index eb6f111..a439c44 100644
--- a/test/py/generate.cmake
+++ b/test/py/generate.cmake
@@ -14,6 +14,7 @@
 generate(${MY_PROJECT_DIR}/test/v0.16/ThriftTest.thrift py:dynamic gen-py-dynamic)
 generate(${MY_PROJECT_DIR}/test/v0.16/ThriftTest.thrift py:dynamic,slots gen-py-dynamicslots)
 generate(${MY_PROJECT_DIR}/test/v0.16/ThriftTest.thrift py:enum gen-py-enum)
+generate(${MY_PROJECT_DIR}/test/v0.16/ThriftTest.thrift py:type_hints gen-py-type_hints)
 
 generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py gen-py-default)
 generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py:slots gen-py-slots)
@@ -22,6 +23,7 @@
 generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py:dynamic gen-py-dynamic)
 generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py:dynamic,slots gen-py-dynamicslots)
 generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py:enum gen-py-enum)
+generate(${MY_PROJECT_DIR}/test/v0.16/DebugProtoTest.thrift py:type_hints gen-py-type_hints)
 
 generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py gen-py-default)
 generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py:slots gen-py-slots)
@@ -30,6 +32,7 @@
 generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py:dynamic gen-py-dynamic)
 generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py:dynamic,slots gen-py-dynamicslots)
 generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py:enum gen-py-enum)
+generate(${MY_PROJECT_DIR}/test/DoubleConstantsTest.thrift py:type_hints gen-py-type_hints)
 
 generate(${MY_PROJECT_DIR}/test/Recursive.thrift py gen-py-default)
 generate(${MY_PROJECT_DIR}/test/Recursive.thrift py:slots gen-py-slots)
@@ -38,3 +41,4 @@
 generate(${MY_PROJECT_DIR}/test/Recursive.thrift py:dynamic gen-py-dynamic)
 generate(${MY_PROJECT_DIR}/test/Recursive.thrift py:dynamic,slots gen-py-dynamicslots)
 generate(${MY_PROJECT_DIR}/test/Recursive.thrift py:enum gen-py-enum)
+generate(${MY_PROJECT_DIR}/test/Recursive.thrift py:type_hints gen-py-type_hints)