Repository: ni/nimi-python (language: python)

Issue:
Test code should be separate from module code
(Copied from #1473)

Having the tests be in the same file as the source code is not something I'd expect when installing a Python module.

- It pollutes the API of the module (attribute discovery will show a bunch of unrelated functions)
- It can pollute the module's dependencies
- It bloats the installed modules (more LOC to download and sift through)
- It makes features such as `pytest`'s `conftest.py` harder to use.

If you want people to be able to run tests after installation you should allow installation using an extra (like `nidmm[test]`)


Discussion / hints:
#1477 should fix this issue for `converters`. With that, none of the "shipping" modules should have this problem.
But there are other modules in [helper folder](https://github.com/ni/nimi-python/tree/master/build/helper), which are used during codegen, that we need to fix.

Fix patch:
diff --git a/build/helper/codegen_helper.py b/build/helper/codegen_helper.py
index a9d58e8cf..6bd805880 100644
--- a/build/helper/codegen_helper.py
+++ b/build/helper/codegen_helper.py
@@ -562,1331 +562,3 @@ def get_enum_value_snippet(value):
     '''Returns value formatted into string, surrounding it with single quotes if it is of str type'''
     return ("'{}'" if type(value) is str else "{}").format(value)
 
-
-#
-# Let's do some unit testing!
-#
-
-
-# We need a config object for our testing
-config_for_testing = {
-    'session_handle_parameter_name': 'vi',
-    'module_name': 'nifake',
-    'functions': {},
-    'attributes': {},
-    'modules': {
-        'metadata.enums_addon': {}
-    },
-    'custom_types': [
-        {'file_name': 'custom_struct', 'python_name': 'CustomStruct', 'ctypes_type': 'custom_struct', },
-    ],
-}
-
-
-# We also need some function parameters that cover all cases.
-parameters_for_testing = [
-    {  # 0
-        'ctypes_method_call_snippet': 'vi_ctype',
-        'ctypes_type': 'ViSession',
-        'ctypes_type_library_call': 'ViSession',
-        'ctypes_variable_name': 'vi_ctype',
-        'direction': 'in',
-        'documentation': {'description': 'Identifies a particular instrument session.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'vi',
-        'is_buffer': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': True,
-        'interpreter_method_call_snippet': 'self._vi',
-        'name': 'vi',
-        'python_name': 'vi',
-        'python_name_with_default': 'vi',
-        'python_name_with_doc_default': 'vi',
-        'python_type': 'int',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViSession',
-        'numpy': False,
-        'use_in_python_api': True,
-    },
-    {  # 1
-        'ctypes_method_call_snippet': 'ctypes.pointer(output_ctype)',
-        'ctypes_type': 'ViInt64',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViInt64)',
-        'ctypes_variable_name': 'output_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'A big number on its way out.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'output',
-        'is_buffer': False,
-        'is_string': False,
-        'use_array': False,
-        'use_list': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'output',
-        'name': 'output',
-        'python_name': 'output',
-        'python_name_with_default': 'output',
-        'python_name_with_doc_default': 'output',
-        'python_type': 'int',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViInt64',
-        'numpy': False,
-        'use_in_python_api': True,
-    },
-    {  # 2
-        'ctypes_method_call_snippet': 'error_message_ctype',
-        'ctypes_type': 'ViString',
-        'ctypes_type_library_call': 'ViString',
-        'ctypes_variable_name': 'error_message_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'The error information formatted into a string.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'error_message',
-        'is_buffer': False,
-        'use_array': False,
-        'use_list': False,
-        'is_string': True,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'error_message',
-        'name': 'errorMessage',
-        'python_name': 'error_message',
-        'python_name_with_default': 'error_message',
-        'python_name_with_doc_default': 'error_message',
-        'python_type': 'str',
-        'size': {'mechanism': 'fixed', 'value': 256},
-        'type': 'ViString',
-        'numpy': False,
-        'use_in_python_api': True,
-    },
-    {  # 3
-        'ctypes_method_call_snippet': 'array_out_ctype',
-        'ctypes_type': 'custom_struct',
-        'ctypes_type_library_call': 'ctypes.POINTER(custom_struct)',
-        'ctypes_variable_name': 'array_out_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'Array of custom type using python-code size mechanism'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'array_out',
-        'is_buffer': True,
-        'use_array': False,
-        'use_list': True,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'array_out',
-        'name': 'arrayOut',
-        'original_type': 'custom_struct[]',
-        'python_name': 'array_out',
-        'python_name_with_default': 'array_out',
-        'python_name_with_doc_default': 'array_out',
-        'python_type': 'CustomStruct',
-        'size': {'mechanism': 'python-code', 'value': 'self.get_array_size_for_python_code()'},
-        'type': 'custom_struct',
-        'numpy': False,
-        'use_in_python_api': True,
-    },
-    {  # 4
-        'ctypes_method_call_snippet': 'number_of_elements_ctype',
-        'ctypes_type': 'ViInt32',
-        'ctypes_type_library_call': 'ViInt32',
-        'ctypes_variable_name': 'number_of_elements_ctype',
-        'direction': 'in',
-        'documentation': {'description': 'Number of elements in the array.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'number_of_elements',
-        'is_buffer': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'number_of_elements',
-        'name': 'numberOfElements',
-        'python_name': 'number_of_elements',
-        'python_name_with_default': 'number_of_elements',
-        'python_name_with_doc_default': 'number_of_elements',
-        'python_type': 'int',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViInt32',
-        'numpy': False,
-        'use_in_python_api': True,
-    },
-    {  # 5
-        'ctypes_method_call_snippet': 'an_array_ctype',
-        'ctypes_type': 'ViInt16',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViInt16)',
-        'ctypes_variable_name': 'an_array_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'Contains an array of enums, stored as 16 bit integers under the hood '},
-        'enum': 'Turtle',
-        'grpc_enum': 'Turtle',
-        'grpc_name': 'an_array_raw',
-        'is_buffer': True,
-        'use_array': False,
-        'use_list': True,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'an_array',
-        'name': 'anArray',
-        'python_name': 'an_array',
-        'python_name_with_default': 'an_array',
-        'python_name_with_doc_default': 'an_array',
-        'python_type': 'enums.Turtle',
-        'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'},
-        'type': 'ViInt16',
-        'numpy': False,
-        'use_in_python_api': True,
-    },
-    {  # 6
-        'ctypes_method_call_snippet': 'an_int_enum_ctype',
-        'ctypes_type': 'ViInt16',
-        'ctypes_type_library_call': 'ViInt16',
-        'ctypes_variable_name': 'an_int_enum_ctype',
-        'direction': 'in',
-        'documentation': {
-            'description': 'Indicates a ninja turtle',
-            'table_body': [['0', 'Leonardo'], ['1', 'Donatello'], ['2', 'Raphael'], ['3', 'Mich elangelo']]
-        },
-        'enum': 'Turtle',
-        'grpc_enum': 'Turtle',
-        'grpc_name': 'an_int_enum_raw',
-        'is_buffer': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'an_int_enum',
-        'name': 'anIntEnum',
-        'python_name': 'an_int_enum',
-        'python_name_with_default': 'an_int_enum',
-        'python_name_with_doc_default': 'an_int_enum',
-        'python_type': 'enums.Turtle',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViInt16',
-        'numpy': False,
-        'use_in_python_api': True,
-    },
-    {  # 7
-        'ctypes_method_call_snippet': 'ctypes.pointer(output_ctype)',
-        'ctypes_type': 'ViInt64',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViInt64)',
-        'ctypes_variable_name': 'output_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'A big number on its way out.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'output',
-        'is_buffer': True,
-        'use_array': True,
-        'use_list': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'output',
-        'name': 'output',
-        'python_name': 'output',
-        'python_name_with_default': 'output',
-        'python_name_with_doc_default': 'output',
-        'python_type': 'int',
-        'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'},
-        'type': 'ViInt64',
-        'numpy': True,
-        'numpy_type': 'int64',
-        'numpy_type_library_call': 'numpy.int64',
-        'use_in_python_api': True,
-    },
-    {  # 8
-        'ctypes_method_call_snippet': 'number_of_elements_python_code_ctype',
-        'ctypes_type': 'ViInt32',
-        'ctypes_type_library_call': 'ViInt32',
-        'ctypes_variable_name': 'number_of_elements_python_code_ctype',
-        'direction': 'in',
-        'documentation': {'description': 'Number of elements in the array, determined via mechanism python-code.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'number_of_elements_python_code',
-        'is_buffer': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'number_of_elements_python_code',
-        'name': 'numberOfElementsPythonCode',
-        'numpy': False,
-        'python_name': 'number_of_elements_python_code',
-        'python_name_with_default': 'number_of_elements_python_code',
-        'python_name_with_doc_default': 'number_of_elements_python_code',
-        'python_type': 'int',
-        'size': {'mechanism': 'python-code', 'value': 'self.get_array_size_for_python_code()'},
-        'type': 'ViInt32',
-        'use_in_python_api': True,
-    },
-    {  # 9
-        'ctypes_method_call_snippet': 'input_ctype',
-        'ctypes_type': 'ViInt16',
-        'ctypes_type_library_call': 'ViInt16',
-        'ctypes_variable_name': 'input_ctype',
-        'direction': 'in',
-        'documentation': {'description': 'An input value.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'input',
-        'is_buffer': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'input',
-        'name': 'input',
-        'numpy': False,
-        'python_name': 'input',
-        'python_name_with_default': 'input',
-        'python_name_with_doc_default': 'input',
-        'python_type': 'int',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViInt16',
-        'use_in_python_api': True,
-    },
-    {  # 10
-        'ctypes_method_call_snippet': 'input_array_ctype',
-        'ctypes_type': 'ViReal64',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
-        'ctypes_variable_name': 'input_array_ctype',
-        'default_value': None,
-        'direction': 'in',
-        'documentation': {'description': 'Input array of floats'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'input_array',
-        'is_buffer': True,
-        'is_string': False,
-        'use_array': True,
-        'use_list': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'input_array',
-        'name': 'inputArray',
-        'numpy': False,
-        'python_name': 'input_array',
-        'python_name_with_default': 'input_array=None',
-        'python_name_with_doc_default': 'input_array=None',
-        'python_type': 'float',
-        'size': {'mechanism': 'len', 'value': 'inputArraySize'},
-        'type': 'ViReal64',
-        'use_in_python_api': True,
-    },
-    {  # 11
-        'ctypes_method_call_snippet': 'input_array_size_ctype',
-        'ctypes_type': 'ViInt32',
-        'ctypes_type_library_call': 'ViInt32',
-        'ctypes_variable_name': 'input_array_size_ctype',
-        'direction': 'in',
-        'documentation': {'description': 'Size of inputArray'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'input_array_size',
-        'is_buffer': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'input_array_size',
-        'name': 'inputArraySize',
-        'numpy': False,
-        'python_name': 'input_array_size',
-        'python_name_with_default': 'input_array_size',
-        'python_name_with_doc_default': 'input_array_size',
-        'python_type': 'int',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViInt32',
-        'use_in_python_api': True,
-    },
-    {  # 12
-        'ctypes_method_call_snippet': 'string_size_ctype',
-        'ctypes_type': 'ViInt32',
-        'ctypes_type_library_call': 'ViInt32',
-        'ctypes_variable_name': 'string_size_ctype',
-        'direction': 'in',
-        'documentation': {'description': 'Number of bytes allocated for aString'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'string_size',
-        'is_buffer': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'string_size',
-        'name': 'stringSize',
-        'numpy': False,
-        'python_name': 'string_size',
-        'python_name_with_default': 'string_size',
-        'python_name_with_doc_default': 'string_size',
-        'python_type': 'int',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViInt32',
-        'use_in_python_api': True,
-    },
-    {  # 13
-        'ctypes_method_call_snippet': 'a_string_ctype',
-        'ctypes_type': 'ViString',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
-        'ctypes_variable_name': 'a_string_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'An IVI dance string.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'a_string',
-        'is_buffer': False,
-        'is_string': True,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'a_string',
-        'name': 'aString',
-        'numpy': False,
-        'python_name': 'a_string',
-        'python_name_with_default': 'a_string',
-        'python_name_with_doc_default': 'a_string',
-        'python_type': 'str',
-        'size': {'mechanism': 'ivi-dance', 'value': 'stringSize'},
-        'type': 'ViString',
-        'use_in_python_api': True,
-    },
-    {  # 14
-        'ctypes_method_call_snippet': 'timeout_ctype',
-        'ctypes_type': 'ViReal64',
-        'ctypes_type_library_call': 'ViReal64',
-        'ctypes_variable_name': 'timeout_ctype',
-        'default_value': 1.0,
-        'direction': 'in',
-        'documentation': {'description': 'Timeout in seconds'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'timeout',
-        'is_buffer': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'timeout',
-        'name': 'Timeout',
-        'numpy': False,
-        'python_name': 'timeout',
-        'python_name_with_default': 'timeout=1.0',
-        'python_name_with_doc_default': 'timeout=1.0',
-        'python_type': 'float',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViReal64',
-        'use_in_python_api': True,
-        'python_api_converter_name': 'timedelta_converter_seconds_real64',
-    },
-    {  # 15
-        'ctypes_method_call_snippet': 'channel_list_ctype',
-        'ctypes_type': 'ViString',
-        'ctypes_type_library_call': 'ViString',
-        'ctypes_variable_name': 'channel_list_ctype',
-        'direction': 'in',
-        'documentation': {
-            'description': 'The channel to configure. For more information, refer to `Channel String'
-        },
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'channel_list',
-        'is_buffer': False,
-        'is_string': True,
-        'is_repeated_capability': True,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'self._repeated_capability',
-        'name': 'channelList',
-        'numpy': False,
-        'original_type': 'ViChar[]',
-        'python_name': 'channel_list',
-        'python_name_with_default': 'channel_list',
-        'python_name_with_doc_default': 'channel_list',
-        'python_type': 'str',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViString',
-        'use_in_python_api': True,
-    },
-    {  # 16
-        'ctypes_method_call_snippet': 'a_string_ctype',
-        'ctypes_type': 'ViString',
-        'ctypes_type_library_call': 'ViString',
-        'ctypes_variable_name': 'a_string_ctype',
-        'direction': 'in',
-        'documentation': {'description': 'An input string.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'a_string',
-        'is_buffer': False,
-        'is_string': True,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'a_string',
-        'name': 'aString',
-        'numpy': False,
-        'python_name': 'a_string',
-        'python_name_with_default': 'a_string',
-        'python_name_with_doc_default': 'a_string',
-        'python_type': 'int',
-        'size': {'mechanism': 'len', 'value': 'a_string'},
-        'type': 'ViString',
-        'use_in_python_api': True,
-    },
-    {  # 17
-        'ctypes_method_call_snippet': 'array_in_ctype',
-        'ctypes_type': 'custom_struct',
-        'ctypes_type_library_call': 'ctypes.POINTER(custom_struct)',
-        'ctypes_variable_name': 'array_in_ctype',
-        'direction': 'in',
-        'documentation': {'description': 'Array of custom type using python-code size mechanism'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'array_in',
-        'is_buffer': True,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'array_in',
-        'name': 'arrayOut',
-        'original_type': 'custom_struct[]',
-        'python_name': 'array_in',
-        'python_name_with_default': 'array_in',
-        'python_name_with_doc_default': 'array_in',
-        'python_type': 'CustomStruct',
-        'size': {'mechanism': 'len', 'value': 'array_in'},
-        'type': 'custom_struct',
-        'numpy': False,
-        'use_in_python_api': True,
-    },
-    {  # 18
-        'ctypes_method_call_snippet': 'an_int_ctype',
-        'ctypes_type': 'ViInt16',
-        'ctypes_type_library_call': 'ViInt16',
-        'ctypes_variable_name': 'an_int_ctype',
-        'direction': 'out',
-        'documentation': {
-            'description': 'Indicates a ninja turtle',
-        },
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'an_int',
-        'is_buffer': True,
-        'use_array': True,
-        'use_list': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'an_int',
-        'name': 'anInt',
-        'python_name': 'an_int',
-        'python_name_with_default': 'an_int',
-        'python_name_with_doc_default': 'an_int',
-        'python_type': 'int',
-        'size': {'mechanism': 'fixed', 'value': 256},
-        'type': 'ViInt16',
-        'numpy': False,
-        'use_in_python_api': True,
-    },
-    {  # 19
-        'ctypes_method_call_snippet': 'a_string_2_ctype',
-        'ctypes_type': 'ViString',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
-        'ctypes_variable_name': 'a_string_2_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'A fixed size string.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'a_string_2',
-        'is_buffer': False,
-        'is_string': True,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'a_string_2',
-        'name': 'aString2',
-        'numpy': False,
-        'python_name': 'a_string_2',
-        'python_name_with_default': 'a_string_2',
-        'python_name_with_doc_default': 'a_string_2',
-        'python_type': 'str',
-        'size': {'mechanism': 'fixed', 'value': 256},
-        'type': 'ViString',
-        'use_in_python_api': True,
-    },
-    {  # 20
-        'ctypes_method_call_snippet': 'a_string_3_ctype',
-        'ctypes_type': 'ViString',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
-        'ctypes_variable_name': 'a_string_3_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'A python-code size string.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'a_string_3',
-        'is_buffer': False,
-        'is_string': True,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'a_string_3',
-        'name': 'aStrin3g',
-        'numpy': False,
-        'python_name': 'a_string_3',
-        'python_name_with_default': 'a_string_3',
-        'python_name_with_doc_default': 'a_string_3',
-        'python_type': 'str',
-        'size': {'mechanism': 'python-code', 'value': 'string_size'},
-        'type': 'ViString',
-        'use_in_python_api': True,
-    },
-    {  # 21
-        'ctypes_method_call_snippet': 'a_string_twist_ctype',
-        'ctypes_type': 'ViString',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
-        'ctypes_variable_name': 'a_string_twist_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'An IVI dance with a twist string.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'a_string_twist',
-        'is_buffer': False,
-        'is_string': True,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'a_string_twist',
-        'name': 'aStringTwist',
-        'numpy': False,
-        'python_name': 'a_string_twist',
-        'python_name_with_default': 'a_string_twist',
-        'python_name_with_doc_default': 'a_string_twist',
-        'python_type': 'str',
-        'size': {'mechanism': 'ivi-dance-with-a-twist', 'value': 'stringSizeTwist', 'value_twist': 'output_twist', },
-        'type': 'ViString',
-        'use_in_python_api': True,
-    },
-    {  # 22
-        'ctypes_method_call_snippet': 'ctypes.pointer(output_twist_ctype)',
-        'ctypes_type': 'ViInt64',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViInt64)',
-        'ctypes_variable_name': 'output_twist_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'A big number on its way out.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'output_twist',
-        'is_buffer': False,
-        'is_string': False,
-        'use_array': False,
-        'use_list': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'output_twist',
-        'name': 'output_twist',
-        'python_name': 'output_twist',
-        'python_name_with_default': 'output_twist',
-        'python_name_with_doc_default': 'output_twist',
-        'python_type': 'int',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViInt64',
-        'numpy': False,
-        'use_in_python_api': True,
-    },
-    {  # 23
-        'ctypes_method_call_snippet': 'string_size_twist_ctype',
-        'ctypes_type': 'ViInt32',
-        'ctypes_type_library_call': 'ViInt32',
-        'ctypes_variable_name': 'string_size_twist_ctype',
-        'direction': 'in',
-        'documentation': {'description': 'Number of bytes allocated for aStringTwist'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'string_size_twist',
-        'is_buffer': False,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'string_size_twist',
-        'name': 'stringSizeTwist',
-        'numpy': False,
-        'python_name': 'string_size_twist',
-        'python_name_with_default': 'string_size_twist',
-        'python_name_with_doc_default': 'string_size_twist',
-        'python_type': 'int',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViInt32',
-        'use_in_python_api': True,
-    },
-    {  # 24
-        'ctypes_method_call_snippet': 'a_buffer_ctype',
-        'ctypes_type': 'ViInt32',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
-        'ctypes_variable_name': 'a_buffer_array_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'An IVI dance buffer using array.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'a_buffer_array',
-        'is_buffer': True,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'a_buffer',
-        'name': 'aBufferArray',
-        'numpy': False,
-        'python_name': 'a_buffer_array',
-        'python_name_with_default': 'a_buffer_array',
-        'python_name_with_doc_default': 'a_buffer_array',
-        'python_type': 'int',
-        'size': {'mechanism': 'ivi-dance', 'value': 'stringSize'},
-        'type': 'ViInt32',
-        'use_array': True,
-        'use_list': False,
-        'use_in_python_api': True,
-    },
-    {  # 25
-        'ctypes_method_call_snippet': 'a_buffer_ctype',
-        'ctypes_type': 'ViInt32',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
-        'ctypes_variable_name': 'a_buffer_list_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'An IVI dance buffer using a list.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'a_buffer_list',
-        'is_buffer': True,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'a_buffer',
-        'name': 'aBufferList',
-        'numpy': False,
-        'python_name': 'a_buffer_list',
-        'python_name_with_default': 'a_buffer_list',
-        'python_name_with_doc_default': 'a_buffer_list',
-        'python_type': 'int',
-        'size': {'mechanism': 'ivi-dance', 'value': 'stringSize'},
-        'type': 'ViInt32',
-        'use_array': False,
-        'use_list': True,
-        'use_in_python_api': True,
-    },
-    {  # 26
-        'ctypes_method_call_snippet': 'a_buffer_ctype',
-        'ctypes_type': 'ViInt32',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
-        'ctypes_variable_name': 'a_buffer_twist_array_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'An IVI dance with a twist buffer using an array.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'a_buffer_twist_array',
-        'is_buffer': True,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'a_buffer',
-        'name': 'aBufferTwistArray',
-        'numpy': False,
-        'python_name': 'a_buffer_twist_array',
-        'python_name_with_default': 'a_buffer_twist_array',
-        'python_name_with_doc_default': 'a_buffer_twist_array',
-        'python_type': 'int',
-        'size': {'mechanism': 'ivi-dance-with-a-twist', 'value': 'stringSizeTwist', 'value_twist': 'output_twist', },
-        'type': 'ViInt32',
-        'use_array': True,
-        'use_list': False,
-        'use_in_python_api': True,
-    },
-    {  # 27
-        'ctypes_method_call_snippet': 'a_buffer_ctype',
-        'ctypes_type': 'ViInt32',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
-        'ctypes_variable_name': 'a_buffer_twist_list_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'An IVI dance with a twist buffer using a list.'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'a_buffer_twist_list',
-        'is_buffer': True,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'a_buffer',
-        'name': 'aBufferTwistList',
-        'numpy': False,
-        'python_name': 'a_buffer_twist_list',
-        'python_name_with_default': 'a_buffer_twist_list',
-        'python_name_with_doc_default': 'a_buffer_twist_list',
-        'python_type': 'int',
-        'size': {'mechanism': 'ivi-dance-with-a-twist', 'value': 'stringSizeTwist', 'value_twist': 'output_twist', },
-        'type': 'ViInt32',
-        'use_array': False,
-        'use_list': True,
-        'use_in_python_api': True,
-    },
-    {  # 28
-        'ctypes_method_call_snippet': 'input_array_2_ctype',
-        'ctypes_type': 'ViReal64',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
-        'ctypes_variable_name': 'input_array_2_ctype',
-        'default_value': None,
-        'direction': 'in',
-        'documentation': {'description': 'Input array of floats'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'input_array_2',
-        'is_buffer': True,
-        'is_string': False,
-        'use_array': False,
-        'use_list': True,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'input_array_2',
-        'name': 'inputArray2',
-        'numpy': False,
-        'python_name': 'input_array_2',
-        'python_name_with_default': 'input_array_2=None',
-        'python_name_with_doc_default': 'input_array_2=None',
-        'python_type': 'float',
-        'size': {'mechanism': 'len', 'value': 'inputArraySize2'},
-        'type': 'ViReal64',
-        'use_in_python_api': True,
-    },
-    {  # 29
-        'ctypes_method_call_snippet': 'input_array_2_ctype',
-        'ctypes_type': 'ViReal64',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
-        'ctypes_variable_name': 'input_array_2_ctype',
-        'default_value': None,
-        'direction': 'in',
-        'documentation': {'description': 'Input array of floats'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'input_array_2',
-        'is_buffer': True,
-        'is_string': False,
-        'use_array': False,
-        'use_list': True,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'input_array_2',
-        'name': 'inputArray2',
-        'numpy': False,
-        'python_api_converter_name': 'convert_to_nitclk_session_num_list',
-        'python_name': 'input_array_2',
-        'python_name_with_default': 'input_array_2=None',
-        'python_name_with_doc_default': 'input_array_2=None',
-        'python_type': 'float',
-        'size': {'mechanism': 'len', 'value': 'inputArraySize2'},
-        'type': 'ViReal64',
-        'use_in_python_api': True,
-    },
-    {  # 30
-        'ctypes_method_call_snippet': 'input_array_3_ctype',
-        'ctypes_type': 'ViReal64',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
-        'ctypes_variable_name': 'input_array_3_ctype',
-        'default_value': None,
-        'direction': 'in',
-        'documentation': {'description': 'Input array of floats'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'input_array_3',
-        'is_buffer': True,
-        'is_string': False,
-        'use_array': True,
-        'use_list': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'input_array_3',
-        'name': 'inputArray3',
-        'numpy': False,
-        'python_api_converter_name': 'convert_to_nitclk_session_num_list',
-        'python_name': 'input_array_3',
-        'python_name_with_default': 'input_array_3=None',
-        'python_name_with_doc_default': 'input_array_3=None',
-        'python_type': 'float',
-        'size': {'mechanism': 'len', 'value': 'inputArraySize3'},
-        'type': 'ViReal64',
-        'use_in_python_api': True,
-    },
-    {  # 31
-        'ctypes_method_call_snippet': 'input_array_3_ctype',
-        'ctypes_type': 'custom_struct',
-        'ctypes_type_library_call': 'ctypes.POINTER(custom_struct)',
-        'ctypes_variable_name': 'input_array_4_ctype',
-        'default_value': None,
-        'direction': 'in',
-        'documentation': {'description': 'Input array of floats'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'input_array_4',
-        'is_buffer': True,
-        'is_string': False,
-        'use_array': False,
-        'use_list': True,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'input_array_3',
-        'name': 'inputArray4',
-        'numpy': False,
-        'python_api_converter_name': 'convert_to_nitclk_session_num_list',
-        'python_name': 'input_array_4',
-        'python_name_with_default': 'input_array_4=None',
-        'python_name_with_doc_default': 'input_array_4=None',
-        'python_type': 'float',
-        'size': {'mechanism': 'len', 'value': 'inputArraySize4'},
-        'type': 'ViReal64',
-        'use_in_python_api': True,
-    },
-    {  # 32
-        'ctypes_method_call_snippet': 'input_array_3_ctype',
-        'ctypes_type': 'custom_struct',
-        'ctypes_type_library_call': 'ctypes.POINTER(custom_struct)',
-        'ctypes_variable_name': 'input_array_4_ctype',
-        'default_value': None,
-        'direction': 'in',
-        'documentation': {'description': 'Input array of floats'},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'input_array_4',
-        'is_buffer': True,
-        'is_string': False,
-        'use_array': False,
-        'use_list': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'input_array_3',
-        'name': 'inputArray4',
-        'numpy': False,
-        'python_api_converter_name': 'convert_to_nitclk_session_num_list',
-        'python_name': 'input_array_4',
-        'python_name_with_default': 'input_array_4=None',
-        'python_name_with_doc_default': 'input_array_4=None',
-        'python_type': 'float',
-        'size': {'mechanism': 'len', 'value': 'inputArraySize4'},
-        'type': 'ViReal64',
-        'use_in_python_api': True,
-    },
-    {  # 33
-        'ctypes_method_call_snippet': 'a_string_enum_ctype',
-        'ctypes_type': 'ViString',
-        'ctypes_type_library_call': 'ViString',
-        'ctypes_variable_name': 'a_string_enum_ctype',
-        'direction': 'in',
-        'documentation': {'description': 'An input string-valued enum.'},
-        'enum': 'Color',
-        'grpc_enum': 'Color',
-        'grpc_name': 'a_string_enum_raw',
-        'is_buffer': False,
-        'is_string': True,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'a_string_enum',
-        'name': 'aStringEnum',
-        'numpy': False,
-        'python_name': 'a_string_enum',
-        'python_name_with_default': 'a_string_enum',
-        'python_name_with_doc_default': 'a_string_enum',
-        'python_type': 'enums.Color',
-        'size': {'mechanism': 'len', 'value': 'a_string_enum'},
-        'type': 'ViString',
-        'use_in_python_api': True,
-    },
-    {  # 34
-        'ctypes_method_call_snippet': 'indices_ctype',
-        'ctypes_type': 'ViConstString',
-        'ctypes_type_library_call': 'ViConstString',
-        'ctypes_variable_name': 'indices_ctype',
-        'direction': 'in',
-        'documentation': {
-            'description': 'Specifies a list of indices for the channels in the session.'
-        },
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'indices',
-        'is_buffer': False,
-        'is_string': True,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'indices',
-        'name': 'indices',
-        'numpy': False,
-        'original_type': 'ViChar[]',
-        'python_api_converter_name': 'convert_repeated_capabilities_without_prefix',
-        'python_name': 'indices',
-        'python_name_with_default': 'indices',
-        'python_name_with_doc_default': 'indices',
-        'python_type': 'str',
-        'size': {'mechanism': 'fixed', 'value': 1},
-        'type': 'ViConstString',
-        'use_in_python_api': True,
-    },
-    {  # 35
-        'ctypes_method_call_snippet': 'an_array_ctype',
-        'ctypes_type': 'ViInt8',
-        'ctypes_type_library_call': 'ctypes.POINTER(ViInt8)',
-        'ctypes_variable_name': 'an_array_ctype',
-        'direction': 'out',
-        'documentation': {'description': 'Contains an array of enums, stored as 8 bit integers under the hood '},
-        'enum': None,
-        'grpc_enum': None,
-        'grpc_name': 'a_grpc_array',
-        'is_buffer': True,
-        'use_array': False,
-        'use_list': True,
-        'is_string': False,
-        'is_repeated_capability': False,
-        'is_session_handle': False,
-        'interpreter_method_call_snippet': 'an_array',
-        'name': 'anArray',
-        'python_api_converter_name': 'convert_to_bytes',
-        'python_name': 'an_array',
-        'python_name_with_default': 'an_array',
-        'python_name_with_doc_default': 'an_array',
-        'python_type': 'int',
-        'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'},
-        'type': 'ViInt8',
-        'numpy': False,
-        'use_in_python_api': True,
-    },
-]
-
-
-def test_get_library_interpreter_method_return_snippet_vi():
-    param = [parameters_for_testing[0]]
-    assert get_library_interpreter_method_return_snippet(param, config_for_testing) == 'return'
-
-
-def test_get_library_interpreter_method_return_snippet_int():
-    param = [parameters_for_testing[1]]
-    assert get_library_interpreter_method_return_snippet(param, config_for_testing) == 'return int(output_ctype.value)'
-
-
-def test_get_library_interpreter_method_return_snippet_string():
-    param = [parameters_for_testing[2]]
-    assert get_library_interpreter_method_return_snippet(param, config_for_testing) == 'return error_message_ctype.value.decode(self._encoding)'
-
-
-def test_get_library_interpreter_method_return_snippet_custom_type():
-    param = [parameters_for_testing[3]]
-    assert get_library_interpreter_method_return_snippet(param, config_for_testing) == 'return [custom_struct.CustomStruct(array_out_ctype[i]) for i in range(self.get_array_size_for_python_code())]'
-
-
-def test_get_library_interpreter_method_return_snippet_enum():
-    param = [parameters_for_testing[4], parameters_for_testing[5]]
-    assert get_library_interpreter_method_return_snippet(param, config_for_testing) == 'return [enums.Turtle(an_array_ctype[i]) for i in range(number_of_elements_ctype.value)]'
-
-
-def test_get_library_interpreter_method_return_snippet_into():
-    param = [parameters_for_testing[4], parameters_for_testing[7]]
-    assert get_library_interpreter_method_return_snippet(param, config_for_testing, use_numpy_array=True) == 'return'
-
-
-def test_get_grpc_interpreter_method_return_snippet_vi():
-    param = [parameters_for_testing[0]]
-    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return'
-
-
-def test_get_grpc_interpreter_method_return_snippet_int():
-    param = [parameters_for_testing[1]]
-    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return response.output'
-
-
-def test_get_grpc_interpreter_method_return_snippet_string():
-    param = [parameters_for_testing[2]]
-    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return response.error_message'
-
-
-def test_get_grpc_interpreter_method_return_snippet_custom_type():
-    param = [parameters_for_testing[3]]
-    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return [custom_struct.CustomStruct(x) for x in response.array_out]'
-
-
-def test_get_grpc_interpreter_method_return_snippet_enum():
-    param = [parameters_for_testing[4], parameters_for_testing[5]]
-    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return [enums.Turtle(x) for x in response.an_array_raw]'
-
-
-def test_get_grpc_interpreter_method_return_snippet_bytes():
-    param = [parameters_for_testing[35]]
-    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return response.a_grpc_array'
-
-
-def test_get_session_method_return_snippet():
-    param = [dict(parameters_for_testing[14])]
-    param[0]['direction'] = 'out'
-    assert get_session_method_return_snippet(param, config_for_testing) == 'return _converters.timedelta_converter_seconds_real64(timeout)'
-
-
-def test_get_session_method_return_snippet_non_numpy():
-    param = [parameters_for_testing[4], parameters_for_testing[7]]
-    assert get_session_method_return_snippet(param, config_for_testing) == 'return output'
-
-
-def test_get_session_method_return_snippet_numpy():
-    param = [parameters_for_testing[4], parameters_for_testing[7]]
-    assert get_session_method_return_snippet(param, config_for_testing, use_numpy_array=True) == 'return'
-
-
-def test_get_enum_type_check_snippet():
-    param = parameters_for_testing[6]
-    assert get_enum_type_check_snippet(param, 0) == "if type(an_int_enum) is not enums.Turtle:\nraise TypeError('Parameter an_int_enum must be of type ' + str(enums.Turtle))"
-
-
-def test_get_buffer_parameters_for_size_parameter_none():
-    params = _get_buffer_parameters_for_size_parameter(parameters_for_testing[0], parameters_for_testing)
-    assert len(params) == 0
-
-
-def test_get_buffer_parameters_for_size_parameter():
-    params = _get_buffer_parameters_for_size_parameter(parameters_for_testing[4], parameters_for_testing)
-    assert params[0] == parameters_for_testing[5]
-
-
-def test_get_ctype_variable_declaration_snippet_case_c010():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[15], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["channel_list_ctype = ctypes.create_string_buffer(channel_list.encode(self._encoding))  # case C010"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_c020():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[16], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_string_ctype = ctypes.create_string_buffer(a_string.encode(self._encoding))  # case C020"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_c030():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[33], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_string_enum_ctype = ctypes.create_string_buffer(a_string_enum.value.encode(self._encoding))  # case C030"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_c050():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[13], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_string_ctype = None  # case C050"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_c060():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[13], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_string_ctype = (_visatype.ViChar * string_size_ctype.value)()  # case C060"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_c070():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[19], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_string_2_ctype = (_visatype.ViChar * 256)()  # case C070"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_c080():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[20], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_string_3_ctype = (_visatype.ViChar * string_size)()  # case C080"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_c090():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[21], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_string_twist_ctype = None  # case C090"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_c100():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[21], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_string_twist_ctype = (_visatype.ViChar * output_twist_ctype.value)()  # case C100"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_s110():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[0], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["vi_ctype = _visatype.ViSession(self._vi)  # case S110"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_s120():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[8], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["number_of_elements_python_code_ctype = _visatype.ViInt32(self.get_array_size_for_python_code())  # case S120"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_s130():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[6], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["an_int_enum_ctype = _visatype.ViInt16(an_int_enum.value)  # case S130"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_s150():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[9], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["input_ctype = _visatype.ViInt16(input)  # case S150"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_s160():
-    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[11], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert actual == ["input_array_size_ctype = _visatype.ViInt32(0 if input_array is None else len(input_array))  # case S160"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_s170():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[12], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["string_size_ctype = _visatype.ViInt32()  # case S170"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_s180():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[12], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
-    assert snippet == ["string_size_ctype = _visatype.ViInt32(error_code)  # case S180"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_s2190():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[23], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["string_size_twist_ctype = _visatype.ViInt32(0)  # case S190"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_s200():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[23], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
-    assert snippet == ["string_size_twist_ctype = _visatype.ViInt32(output_twist_ctype.value)  # case S200"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_s210():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[4], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["number_of_elements_ctype = _visatype.ViInt32(number_of_elements)  # case S210"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_s220():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[1], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["output_ctype = _visatype.ViInt64()  # case S220"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b510():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[7], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=True)
-    assert snippet == ["output_ctype = _get_ctypes_pointer_for_buffer(value=output)  # case B510"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b540():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[17], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["array_in_ctype = _get_ctypes_pointer_for_buffer([custom_struct.custom_struct(c) for c in array_in], library_type=custom_struct.custom_struct)  # case B540"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b550_array():
-    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[10], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    expected = [
-        'input_array_array = _convert_to_array(value=input_array, array_type="d")  # case B550',
-        'input_array_ctype = _get_ctypes_pointer_for_buffer(value=input_array_array, library_type=_visatype.ViReal64)  # case B550',
-    ]
-    assert len(actual) == len(expected)
-    for i in range(max(len(actual), len(expected))):
-        assert actual[i] == expected[i]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b550_list():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[28], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["input_array_2_ctype = _get_ctypes_pointer_for_buffer(value=input_array_2, library_type=_visatype.ViReal64)  # case B550"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b560():
-    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[3], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    expected = [
-        'array_out_size = self.get_array_size_for_python_code()  # case B560',
-        'array_out_ctype = _get_ctypes_pointer_for_buffer(library_type=custom_struct.custom_struct, size=array_out_size)  # case B560',
-    ]
-    assert len(actual) == len(expected)
-    for i in range(max(len(actual), len(expected))):
-        assert actual[i] == expected[i]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b570():
-    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[18], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    expected = [
-        'an_int_size = 256  # case B570',
-        'an_int_array = array.array("h", [0] * an_int_size)  # case B570',
-        'an_int_ctype = _get_ctypes_pointer_for_buffer(value=an_int_array, library_type=_visatype.ViInt16)  # case B570',
-    ]
-    assert len(actual) == len(expected)
-    for i in range(max(len(actual), len(expected))):
-        assert actual[i] == expected[i]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b580_array():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[24], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_buffer_array_ctype = None  # case B580"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b590_array():
-    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[24], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
-    expected = [
-        'a_buffer_array_size = string_size_ctype.value  # case B590',
-        'a_buffer_array_array = array.array("l", [0] * a_buffer_array_size)  # case B590',
-        'a_buffer_array_ctype = _get_ctypes_pointer_for_buffer(value=a_buffer_array_array, library_type=_visatype.ViInt32)  # case B590',
-    ]
-    assert len(actual) == len(expected)
-    for i in range(max(len(actual), len(expected))):
-        assert actual[i] == expected[i]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b580_list():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[25], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_buffer_list_ctype = None  # case B580"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b590_list():
-    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[25], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
-    expected = [
-        'a_buffer_list_size = string_size_ctype.value  # case B590',
-        'a_buffer_list_ctype = _get_ctypes_pointer_for_buffer(library_type=_visatype.ViInt32, size=a_buffer_list_size)  # case B590',
-    ]
-    assert len(actual) == len(expected)
-    for i in range(max(len(actual), len(expected))):
-        assert actual[i] == expected[i]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b600():
-    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[7], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-    expected = [
-        'output_size = number_of_elements  # case B600',
-        'output_array = array.array("q", [0] * output_size)  # case B600',
-        'output_ctype = _get_ctypes_pointer_for_buffer(value=output_array, library_type=_visatype.ViInt64)  # case B600',
-    ]
-    assert len(actual) == len(expected)
-    for i in range(max(len(actual), len(expected))):
-        assert actual[i] == expected[i]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b610_array():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[26], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_buffer_twist_array_ctype = None  # case B610"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b620_array():
-    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[26], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
-    expected = [
-        'a_buffer_twist_array_size = output_twist_ctype.value  # case B620',
-        'a_buffer_twist_array_array = array.array("l", [0] * a_buffer_twist_array_size)  # case B620',
-        'a_buffer_twist_array_ctype = _get_ctypes_pointer_for_buffer(value=a_buffer_twist_array_array, library_type=_visatype.ViInt32)  # case B620',
-    ]
-    assert len(actual) == len(expected)
-    for i in range(max(len(actual), len(expected))):
-        assert actual[i] == expected[i]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b610_list():
-    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[27], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
-    assert snippet == ["a_buffer_twist_list_ctype = None  # case B610"]
-
-
-def test_get_ctype_variable_declaration_snippet_case_b620_list():
-    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[27], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
-    expected = [
-        'a_buffer_twist_list_size = output_twist_ctype.value  # case B620',
-        'a_buffer_twist_list_ctype = _get_ctypes_pointer_for_buffer(library_type=_visatype.ViInt32, size=a_buffer_twist_list_size)  # case B620',
-    ]
-    assert len(actual) == len(expected)
-    for i in range(max(len(actual), len(expected))):
-        assert actual[i] == expected[i]
-
-
-def test_get_ctype_variable_declaration_snippet_bad_ivi_dance_step():
-    try:
-        get_ctype_variable_declaration_snippet(parameters_for_testing[12], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
-        assert False
-    except AssertionError:
-        pass
-
-
-# TODO(marcoskirsch): unit tests for reamining cases of get_ctype_variable_declaration_snippet(): parameter is a buffer.
-
-
-def test_get_enum_value_snippet():
-    assert get_enum_value_snippet(None) == 'None'
-    assert get_enum_value_snippet(True) == 'True'
-    assert get_enum_value_snippet(0) == '0'
-    assert get_enum_value_snippet('True') == "'True'"
-    assert get_enum_value_snippet('0') == "'0'"
diff --git a/build/helper/documentation_helper.py b/build/helper/documentation_helper.py
index 97cb452cf..1aade68d0 100644
--- a/build/helper/documentation_helper.py
+++ b/build/helper/documentation_helper.py
@@ -896,733 +896,3 @@ def module_supports_repeated_caps(config):
         return len(config['repeated_capabilities']) > 0
     return False
 
-
-# Unit Tests
-
-
-def _remove_trailing_whitespace(s):
-    '''Removes trailing whitespace and empty lines in multi-line strings.'''
-    initial_lines = s.strip().splitlines()
-    fixed_lines = []
-    blank_lines = 0
-    for line in initial_lines:
-        stripped_line = line.strip()
-        if len(stripped_line) == 0 and blank_lines == 0:
-            fixed_lines.append(stripped_line)
-            blank_lines = 1
-        if len(stripped_line) > 0:
-            fixed_lines.append(stripped_line)
-            blank_lines = 0
-
-    return fixed_lines
-
-
-def assert_rst_strings_are_equal(expected, actual):
-    '''Asserts rst formatted strings (multiline) are equal. Ignores trailing whitespace and empty lines.'''
-    expected = _remove_trailing_whitespace(expected)
-    actual = _remove_trailing_whitespace(actual)
-    for expected_line, actual_line in zip(expected, actual):
-        assert expected_line == actual_line, 'Difference found:\n{0}\n{1}'.format(expected_line, actual_line)
-
-
-config = {
-    'functions': {
-        'GetTurtleID': {
-            'codegen_method': 'public',
-            'returns': 'ViStatus',
-            'method_templates': [{'filename': '/default_method', 'method_python_name_suffix': '', }, ],
-            'parameters': [
-                {
-                    'direction': 'in',
-                    'enum': None,
-                    'name': 'vi',
-                    'type': 'ViSession',
-                    'documentation': {
-                        'description': 'Identifies a particular instrument session.'
-                    },
-                    'python_name': 'vi',
-                    'python_type': 'int',
-                    'type_in_documentation': 'int',
-                    'type_in_documentation_was_calculated': True,
-                    'ctypes_variable_name': 'vi_ctype',
-                    'ctypes_type': 'ViSession',
-                    'ctypes_type_library_call': 'ViSession',
-                    'size': {
-                        'mechanism': 'fixed',
-                        'value': 1
-                    },
-                    'is_buffer': False,
-                    'is_string': False,
-                    'use_list': False,
-                    'use_array': False,
-                    'python_name_with_default': 'vi',
-                    'python_name_with_doc_default': 'vi',
-                    'is_repeated_capability': False,
-                    'is_session_handle': True,
-                    'interpreter_method_call_snippet': 'self._vi',
-                    'use_in_python_api': True,
-                },
-                {
-                    'direction': 'in',
-                    'enum': 'Turtle',
-                    'name': 'turtleType',
-                    'type': 'ViInt32',
-                    'documentation': {
-                        'description': '''Specifies the type of Turtle type
-wanted to choose.''',
-                        'note': 'You wont be able to import NIFAKE_VAL_RAPHAEL',
-                        'table_body': [
-                            ['NIFAKE_VAL_LEONARDO (default)', '0', 'LEONARDO'],
-                            ['NIFAKE_VAL_DONATELLO', '1', 'DONATELLO'],
-                            ['NIFAKE_VAL_RAPHAEL', '2', 'RAPHAEL'],
-                            ['NIFAKE_VAL_MICHELANGELO', '3', 'MICHELANGELO']
-                        ]
-                    },
-                    'python_name': 'turtle_type',
-                    'python_type': 'Turtle',
-                    'type_in_documentation': 'Turtle',
-                    'type_in_documentation_was_calculated': True,
-                    'ctypes_variable_name': 'turtle_type_ctype',
-                    'ctypes_type': 'ViInt32',
-                    'ctypes_type_library_call': 'ViInt32',
-                    'size': {
-                        'mechanism': 'fixed',
-                        'value': 1
-                    },
-                    'is_buffer': False,
-                    'is_string': False,
-                    'use_list': False,
-                    'use_array': False,
-                    'python_name_with_default': 'turtle_type',
-                    'python_name_with_doc_default': 'turtle_type',
-                    'is_repeated_capability': False,
-                    'is_session_handle': False,
-                    'interpreter_method_call_snippet': 'turtle_type',
-                    'use_in_python_api': True,
-                },
-                {
-                    'direction': 'out',
-                    'enum': None,
-                    'name': 'turtleId',
-                    'type': 'ViReal64',
-                    'documentation': {
-                        'description': 'Returns the **ID** of selected turtle.'
-                    },
-                    'python_name': 'turtle_id',
-                    'python_type': 'float',
-                    'type_in_documentation': 'float',
-                    'type_in_documentation_was_calculated': True,
-                    'ctypes_variable_name': 'turtleId_ctype',
-                    'ctypes_type': 'ViReal64',
-                    'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
-                    'size': {
-                        'mechanism': 'fixed',
-                        'value': 1
-                    },
-                    'is_buffer': False,
-                    'is_string': False,
-                    'use_list': False,
-                    'use_array': False,
-                    'python_name_with_default': 'turtleId',
-                    'python_name_with_doc_default': 'turtleId',
-                    'is_repeated_capability': False,
-                    'is_session_handle': False,
-                    'interpreter_method_call_snippet': 'ctypes.pointer(turtleId_ctype)',
-                    'use_in_python_api': True,
-                }
-            ],
-            'documentation': {
-                'description': 'Returns the **ID** of selected Turtle Type. See `NIFAKE help <REPLACE_DRIVER_SPECIFIC_URL_1(fake_functional_overview)>`__',
-                'note': [
-                    'The NIFAKE_VAL_RAPHAEL Turtles dont have an ID.',
-                    'DO NOT call niFake_FetchWaveform after calling this function.',
-                    'NIFAKE_ATTR_READ_WRITE_BOOL will have an incorrect value after this calling this function',
-                ]
-            },
-            'name': 'GetTurtleID',
-            'python_name': 'get_turtle_id',
-            'interpreter_name': 'get_turtle_id',
-            'is_error_handling': False,
-            'has_repeated_capability': False
-        },
-        'FetchWaveform': {
-            'codegen_method': 'public',
-            'documentation': {'description': 'Returns waveform data.'},
-            'has_repeated_capability': False,
-            'is_error_handling': False,
-            'method_templates': [{'filename': '/default_method', 'method_python_name_suffix': ''}, {'filename': '/numpy_method', 'method_python_name_suffix': '_into'}],
-            'name': 'FetchWaveform',
-            'parameters': [
-                {
-                    'ctypes_type': 'ViSession',
-                    'ctypes_type_library_call': 'ViSession',
-                    'ctypes_variable_name': 'vi_ctype',
-                    'direction': 'in',
-                    'documentation': {'description': 'Identifies a particular instrument session.'},
-                    'enum': None,
-                    'is_buffer': False,
-                    'is_string': False,
-                    'use_list': False,
-                    'use_array': False,
-                    'is_repeated_capability': False,
-                    'is_session_handle': True,
-                    'interpreter_method_call_snippet': 'vi_ctype',
-                    'name': 'vi',
-                    'numpy': False,
-                    'python_name': 'vi',
-                    'python_name_with_default': 'vi',
-                    'python_name_with_doc_default': 'vi',
-                    'python_type': 'int',
-                    'type_in_documentation': 'int',
-                    'type_in_documentation_was_calculated': True,
-                    'size': {'mechanism': 'fixed', 'value': 1},
-                    'type': 'ViSession',
-                    'use_in_python_api': True,
-                },
-                {
-                    'ctypes_type': 'ViInt32',
-                    'ctypes_type_library_call': 'ViInt32',
-                    'ctypes_variable_name': 'number_of_samples_ctype',
-                    'direction': 'in',
-                    'documentation': {'description': 'Number of samples to return'},
-                    'enum': None,
-                    'is_buffer': False,
-                    'is_string': False,
-                    'use_list': False,
-                    'use_array': False,
-                    'is_repeated_capability': False,
-                    'is_session_handle': False,
-                    'interpreter_method_call_snippet': 'number_of_samples_ctype',
-                    'name': 'numberOfSamples',
-                    'numpy': False,
-                    'python_name': 'number_of_samples',
-                    'python_name_with_default': 'number_of_samples',
-                    'python_name_with_doc_default': 'number_of_samples',
-                    'python_type': 'int',
-                    'type_in_documentation': 'int',
-                    'type_in_documentation_was_calculated': True,
-                    'size': {'mechanism': 'fixed', 'value': 1},
-                    'type': 'ViInt32',
-                    'use_in_python_api': True,
-                },
-                {
-                    'ctypes_type': 'ViReal64',
-                    'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
-                    'ctypes_variable_name': 'waveform_data_ctype',
-                    'direction': 'out',
-                    'documentation': {'description': 'Samples fetched from the device. Array should be numberOfSamples big.'},
-                    'enum': None,
-                    'is_buffer': True,
-                    'is_string': False,
-                    'use_list': False,
-                    'use_array': True,
-                    'is_repeated_capability': False,
-                    'is_session_handle': False,
-                    'interpreter_method_call_snippet': 'waveform_data_ctype',
-                    'name': 'waveformData',
-                    'numpy': True,
-                    'numpy_type': 'float64',
-                    'original_type': 'ViReal64[]',
-                    'python_name': 'waveform_data',
-                    'python_name_with_default': 'waveform_data',
-                    'python_name_with_doc_default': 'waveform_data',
-                    'python_type': 'float',
-                    'type_in_documentation': 'float',
-                    'type_in_documentation_was_calculated': True,
-                    'size': {'mechanism': 'passed-in', 'value': 'numberOfSamples'},
-                    'type': 'ViReal64',
-                    'use_in_python_api': True,
-                },
-                {
-                    'ctypes_type': 'ViInt32',
-                    'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
-                    'ctypes_variable_name': 'actual_number_of_samples_ctype',
-                    'direction': 'out',
-                    'documentation': {'description': 'Number of samples actually fetched.'},
-                    'enum': None,
-                    'is_buffer': False,
-                    'is_string': False,
-                    'use_list': False,
-                    'use_array': False,
-                    'is_repeated_capability': False,
-                    'is_session_handle': False,
-                    'interpreter_method_call_snippet': 'ctypes.pointer(actual_number_of_samples_ctype)',
-                    'name': 'actualNumberOfSamples',
-                    'numpy': False,
-                    'python_name': 'actual_number_of_samples',
-                    'python_name_with_default': 'actual_number_of_samples',
-                    'python_name_with_doc_default': 'actual_number_of_samples',
-                    'python_type': 'int',
-                    'type_in_documentation': 'int',
-                    'type_in_documentation_was_calculated': True,
-                    'size': {'mechanism': 'fixed', 'value': 1},
-                    'type': 'ViInt32',
-                    'use_in_python_api': True,
-                }
-            ],
-            'python_name': 'fetch_waveform',
-            'interpreter_name': 'fetch_waveform',
-            'render_in_session_base': False,
-            'returns': 'ViStatus'
-        },
-    },
-    'metadata_version': '1.0',
-    'module_name': 'nifake',
-    'module_version': '0.3.0.dev0',
-    'c_function_prefix': 'niFake_',
-    'driver_name': 'NI-FAKE',
-    'session_class_description': 'An NI-FAKE session to a fake MI driver whose sole purpose is to test nimi-python code generation',
-    'session_handle_parameter_name': 'vi',
-    'driver_urls': {
-        'REPLACE_DRIVER_SPECIFIC_URL_1': 'http://zone.ni.com/reference/en-XX/help/370384T-01/fake/{0}/',
-    },
-    'library_info':
-    {
-        'Windows': {
-            '32bit': {'name': 'nifake_32.dll', 'type': 'windll'},
-            '64bit': {'name': 'nifake_64.dll', 'type': 'cdll'},
-        },
-        'Linux': {
-            '64bit': {'name': 'libnifake.so', 'type': 'cdll'},
-        },
-    },
-    'context_manager_name': {
-        'task': 'acquisition',
-        'initiate_function': 'Initiate',
-        'abort_function': 'Abort',
-    },
-    'init_function': 'InitWithOptions',
-    'attributes': {
-        1000000: {
-            'access': 'read-write',
-            'enum': None,
-            'lv_property': 'Fake attributes:Read Write Bool',
-            'name': 'READ_WRITE_BOOL',
-            'type': 'ViBoolean',
-            'documentation': {
-                'description': 'An attribute of type bool with read/write access.',
-            },
-        },
-    },
-    'enums': {
-        'Turtle': {
-            'codegen_method': 'public',
-            'python_name': 'Turtle',
-            'values': [
-                {
-                    'name': 'NIFAKE_VAL_LEONARDO',
-                    'python_name': 'LEONARDO',
-                    'value': 0,
-                    'documentation': {
-                        'description': 'Wields two katanas.',
-                    }
-                },
-                {
-                    'name': 'NIFAKE_VAL_DONATELLO',
-                    'python_name': 'DONATELLO',
-                    'value': 1,
-                    'documentation': {
-                        'description': 'Uses a bo staff.',
-                    }
-                },
-                {
-                    'name': 'NIFAKE_VAL_RAPHAEL',
-                    'python_name': 'RAPHAEL',
-                    'value': 2,
-                    'documentation': {
-                        'description': 'Has a pair of sai.',
-                    }
-                },
-                {
-                    'name': 'NIFAKE_VAL_MICHELANGELO',
-                    'python_name': 'MICHELANGELO',
-                    'value': 3,
-                    'documentation': {
-                        'description': 'Owns nunchucks.',
-                    }
-                },
-            ],
-        },
-    },
-}
-
-
-def test_get_function_rst_default():
-    function = config['functions']['GetTurtleID']
-    method_template = function['method_templates'][0]
-    actual_function_rst = get_function_rst(function, method_template=method_template, numpy=False, config=config, indent=0)
-    expected_fuction_rst = '''.. py:method:: get_turtle_id(turtle_type)
-
-    Returns the **ID** of selected Turtle Type. See `NIFAKE help <http://zone.ni.com/reference/en-XX/help/370384T-01/fake/fake_functional_overview/>`__
-
-    .. note:: The :py:data:`~nifake.Turtle.RAPHAEL` Turtles dont have an ID.
-
-    .. note:: DO NOT call :py:meth:`nifake.Session.fetch_waveform` after calling this method.
-
-    .. note:: :py:attr:`nifake.Session.read_write_bool` will have an incorrect value after this calling this method
-
-    :param turtle_type:
-
-    Specifies the type of Turtle type
-    wanted to choose.
-
-    +----------------------------------------------+---+--------------+
-    | :py:data:`~nifake.Turtle.LEONARDO` (default) | 0 | LEONARDO     |
-    +----------------------------------------------+---+--------------+
-    | :py:data:`~nifake.Turtle.DONATELLO`          | 1 | DONATELLO    |
-    +----------------------------------------------+---+--------------+
-    | :py:data:`~nifake.Turtle.RAPHAEL`            | 2 | RAPHAEL      |
-    +----------------------------------------------+---+--------------+
-    | :py:data:`~nifake.Turtle.MICHELANGELO`       | 3 | MICHELANGELO |
-    +----------------------------------------------+---+--------------+
-
-    .. note:: You wont be able to import :py:data:`~nifake.Turtle.RAPHAEL`
-
-    :type turtle_type: :py:data:`nifake.Turtle`
-
-    :rtype: float
-    :return:
-
-        Returns the **ID** of selected turtle.
-'''
-    assert_rst_strings_are_equal(expected_fuction_rst, actual_function_rst)
-
-
-def test_get_function_rst_numpy():
-    function = config['functions']['FetchWaveform']
-    method_template = function['method_templates'][0]
-    actual_function_rst = get_function_rst(function, method_template=method_template, numpy=True, config=config, indent=0)
-    expected_fuction_rst = '''.. py:method:: fetch_waveform(number_of_samples)
-
-    Returns waveform data.
-
-    :param number_of_samples:
-
-        Number of samples to return
-
-    :type number_of_samples: int
-    :param waveform_data:
-
-        Samples fetched from the device. Array should be numberOfSamples big.
-
-    :type waveform_data: numpy.array(dtype=numpy.float64)
-
-    :rtype: int
-    :return:
-
-        Number of samples actually fetched.
-'''
-    assert_rst_strings_are_equal(expected_fuction_rst, actual_function_rst)
-
-
-def test_get_attribute_repeated_caps():
-    attr = {'supported_rep_caps': ['channels', 'instruments', 'pins']}
-    expected_caps = 'channels, instruments, pins'
-    actual_caps = get_attribute_repeated_caps(attr)
-    assert actual_caps == expected_caps
-
-    attr = {'supported_rep_caps': ['channels']}
-    expected_caps = 'channels'
-    actual_caps = get_attribute_repeated_caps(attr)
-    assert actual_caps == expected_caps
-
-    attr = {'supported_rep_caps': []}
-    expected_caps = 'None'
-    actual_caps = get_attribute_repeated_caps(attr)
-    assert actual_caps == expected_caps
-
-    attr = {}
-    expected_caps = 'None'
-    actual_caps = get_attribute_repeated_caps(attr)
-    assert actual_caps == expected_caps
-
-
-def test_get_attribute_repeated_caps_with_conjunction():
-    attr = {'supported_rep_caps': ['channels', 'instruments', 'pins']}
-    expected_caps = 'channels, instruments or pins'
-    actual_caps = get_attribute_repeated_caps_with_conjunction(attr)
-    assert actual_caps == expected_caps
-
-    attr = {'supported_rep_caps': ['channels', 'instruments']}
-    expected_caps = 'channels or instruments'
-    actual_caps = get_attribute_repeated_caps_with_conjunction(attr)
-    assert actual_caps == expected_caps
-
-    attr = {'supported_rep_caps': ['channels']}
-    expected_caps = 'channels'
-    actual_caps = get_attribute_repeated_caps_with_conjunction(attr)
-    assert actual_caps == expected_caps
-
-    attr = {'supported_rep_caps': []}
-    expected_caps = 'None'
-    actual_caps = get_attribute_repeated_caps_with_conjunction(attr)
-    assert actual_caps == expected_caps
-
-
-def test_module_supports_repeated_caps():
-    config = {'repeated_capabilities': [{'python_name': 'channels'}]}
-    expected_value = True
-    actual_value = module_supports_repeated_caps(config)
-    assert actual_value == expected_value
-
-    config = {'repeated_capabilities': []}
-    expected_value = False
-    actual_value = module_supports_repeated_caps(config)
-    assert actual_value == expected_value
-
-    config = {}
-    expected_value = False
-    actual_value = module_supports_repeated_caps(config)
-    assert actual_value == expected_value
-
-
-def test_get_function_docstring_default():
-    function = config['functions']['GetTurtleID']
-    actual_function_docstring = get_function_docstring(function, numpy=False, config=config, indent=0)
-    expected_function_docstring = '''Returns the **ID** of selected Turtle Type. See `NIFAKE help <fake_functional_overview>`__
-
-Note: The Turtle.RAPHAEL Turtles dont have an ID.
-
-Note: DO NOT call fetch_waveform after calling this method.
-
-Note: read_write_bool will have an incorrect value after this calling this method
-
-Args:
-    turtle_type (Turtle): Specifies the type of Turtle type
-        wanted to choose.
-
-        +---------------------------+---+--------------+
-        | Turtle.LEONARDO (default) | 0 | LEONARDO     |
-        +---------------------------+---+--------------+
-        | Turtle.DONATELLO          | 1 | DONATELLO    |
-        +---------------------------+---+--------------+
-        | Turtle.RAPHAEL            | 2 | RAPHAEL      |
-        +---------------------------+---+--------------+
-        | Turtle.MICHELANGELO       | 3 | MICHELANGELO |
-        +---------------------------+---+--------------+
-
-        Note: You wont be able to import Turtle.RAPHAEL
-
-Returns:
-    turtle_id (float): Returns the **ID** of selected turtle.''' # noqa
-    assert_rst_strings_are_equal(expected_function_docstring, actual_function_docstring)
-
-
-def test_get_function_docstring_numpy():
-    function = config['functions']['FetchWaveform']
-    actual_function_docstring = get_function_docstring(function, numpy=True, config=config, indent=0)
-    expected_fuction_docstring = '''Returns waveform data.
-
-    Args:
-        number_of_samples (int): Number of samples to return
-
-        waveform_data (numpy.array(dtype=numpy.float64)): Samples fetched from the device. Array should be numberOfSamples big.
-
-    Returns:
-        actual_number_of_samples (int): Number of samples actually fetched.
-'''
-    assert_rst_strings_are_equal(expected_fuction_docstring, actual_function_docstring)
-
-
-def test_get_rst_header_snippet():
-    header = "This will be your method header"
-    actual_rst_header = get_rst_header_snippet(header)
-    expected_rst_header = """This will be your method header
-==============================="""
-    assert actual_rst_header == expected_rst_header
-
-
-def test_get_documentation_for_node_docstring():
-    caution = """ this is a very
-long string if I had the
-energy to type more and more ..."""
-    description = """ This string might be
-at maximum size I can handle"""
-    node = {
-        'documentation': {
-            'caution': caution,
-            'description': description,
-            'table_header': ['what', 'how', 'who'],
-            'table_body': [
-                ['lorem', 'that is a dummy string', 'Place holder string'],
-                ['ipsum', 'this is a random strinf', 'Yes, I am a random string']
-            ]
-        }
-    }
-    actual_documentation = get_documentation_for_node_docstring(node, config, indent=4)
-    expected_documentation = """Caution:  this is a very
-    long string if I had the
-    energy to type more and more ...
-
-    This string might be
-    at maximum size I can handle
-
-    +-------+-------------------------+---------------------------+
-    | what  | how                     | who                       |
-    +=======+=========================+===========================+
-    | lorem | that is a dummy string  | Place holder string       |
-    +-------+-------------------------+---------------------------+
-    | ipsum | this is a random strinf | Yes, I am a random string |
-    +-------+-------------------------+---------------------------+""" # noqa
-    assert_rst_strings_are_equal(expected_documentation, actual_documentation)
-
-
-def test_get_rst_picture_reference():
-    actual_pic_ref = get_rst_picture_reference('test1', 'test2', 'test3', 'test4')
-    expected_pic_ref = """
-    .. |test1| image:: test2
-        :alt: test3
-        :target: test4
-    """
-    assert_rst_strings_are_equal(expected_pic_ref, actual_pic_ref)
-
-
-def test_square_up_tables():
-    local_config = config_for_testing.copy()
-    functions = {
-        'MakeAFoo': {
-            'codegen_method': 'public',
-            'returns': 'ViStatus',
-            'method_templates': [{'session_filename': '/cool_template', 'documentation_filename': '/cool_template', 'method_python_name_suffix': '', }, ],
-            'parameters': [
-                {
-                    'direction': 'in',
-                    'enum': None,
-                    'name': 'vi',
-                    'type': 'ViSession',
-                    'documentation': {
-                        'description': 'Identifies a particular instrument session.',
-                    },
-                },
-                {
-                    'direction': 'in',
-                    'enum': None,
-                    'name': 'channelName',
-                    'type': 'ViString',
-                    'documentation': {
-                        'description': 'The channel to call this on.',
-                    },
-                },
-            ],
-            'documentation': {
-                'description': 'Performs a foo, and performs it well.',
-                'table_header': ['Just one'],
-                'table_body': [['Just', 'two'], ['this', 'has', 'three']],
-            },
-        },
-    }
-    local_config['functions'] = functions
-    local_config['attributes'] = {}
-    local_config['enums'] = {}
-
-    square_up_tables(local_config)
-    assert len(local_config['functions']['MakeAFoo']['documentation']['table_header']) == 3
-    for line in local_config['functions']['MakeAFoo']['documentation']['table_body']:
-        assert len(line) == 3
-
-
-config_for_testing = {
-    'session_handle_parameter_name': 'vi',
-    'module_name': 'nifake',
-    'functions': {},
-    'attributes': {},
-    'modules': {
-        'metadata.enums_addon': {}
-    },
-    'custom_types': [],
-}
-
-
-def test_add_notes_re_links():
-    local_config = config_for_testing.copy()
-    local_config['c_function_prefix'] = 'niFake'
-    functions = {
-        'MakeAFoo': {
-            'codegen_method': 'public',
-            'returns': 'ViStatus',
-            'method_templates': [{'session_filename': '/cool_template', 'documentation_filename': '/cool_template', 'method_python_name_suffix': '', }, ],
-            'parameters': [
-                {
-                    'direction': 'in',
-                    'enum': None,
-                    'name': 'vi',
-                    'type': 'ViSession',
-                    'documentation': {
-                        'description': 'Identifies a particular instrument session for niFake_MakeAFoo using NIFAKE_ATTR_READ_WRITE_BOOL. You should use NIFAKE_VAL_BLUE',
-                    },
-                },
-                {
-                    'direction': 'in',
-                    'enum': None,
-                    'name': 'channelName',
-                    'type': 'ViString',
-                    'documentation': {
-                        'description': 'The channel to call this on. Similar to niFake_TakeAFoo using NIFAKE_ATTR_NOT_HERE. Use NIFAKE_VAL_PURPLE',
-                    },
-                },
-            ],
-            'documentation': {
-                'description': 'Performs a foo, and performs it well.',
-            },
-            'python_name': 'make_a_foo',
-            'interpreter_name': 'make_a_foo',
-        },
-    }
-    attributes = {
-        1000000: {
-            'access': 'read-write',
-            'enum': None,
-            'lv_property': 'Fake attributes:Read Write Bool',
-            'name': 'READ_WRITE_BOOL',
-            'type': 'ViBoolean',
-            'documentation': {
-                'description': 'An attribute of type bool with read/write access.',
-            },
-        },
-    }
-    enums = {
-        'Color': {
-            'values': [
-                {
-                    'name': 'NIFAKE_VAL_RED',
-                    'value': 1,
-                    'documentation': {
-                        'description': 'Like blood.',
-                    }
-                },
-                {
-                    'name': 'NIFAKE_VAL_BLUE',
-                    'value': 2,
-                    'documentation': {
-                        'description': 'Like the sky.',
-                    }
-                },
-                {
-                    'name': 'NIFAKE_VAL_YELLOW',
-                    'value': 2,
-                    'documentation': {
-                        'description': 'Like a banana.',
-                    }
-                },
-                {
-                    'name': 'NIFAKE_VAL_BLACK',
-                    'value': 2,
-                    'documentation': {
-                        'description': 'Like this developer\'s conscience.',
-                    }
-                },
-            ],
-            'codegen_method': 'public',
-        },
-    }
-    local_config['functions'] = functions
-    local_config['attributes'] = attributes
-    local_config['enums'] = enums
-
-    add_notes_re_links(local_config)
-
-    assert 'note' not in local_config['functions']['MakeAFoo']['parameters'][0]['documentation']
-    assert func_note_text in local_config['functions']['MakeAFoo']['parameters'][1]['documentation']['note']
-    assert attr_note_text in local_config['functions']['MakeAFoo']['parameters'][1]['documentation']['note']
-    assert enum_note_text in local_config['functions']['MakeAFoo']['parameters'][1]['documentation']['note']
-
diff --git a/build/helper/documentation_snippets.py b/build/helper/documentation_snippets.py
index 50f45219e..b4145e822 100644
--- a/build/helper/documentation_snippets.py
+++ b/build/helper/documentation_snippets.py
@@ -142,124 +142,3 @@ def initiate_function_def_for_doc(functions, config):
 
     return function_def
 
-
-def test_close_function_def_for_doc_note_not_list():
-    '''Testing for lack of syntax error - not actual documentation'''
-    functions = {
-        'close': {
-            'documentation': {
-                'description': 'test',
-                'note': 'test',
-            },
-        },
-    }
-    config = {
-        'close_function': 'close'
-    }
-    close_doc = close_function_def_for_doc(functions, config)
-    assert type(close_doc) is dict
-    return
-
-
-def test_close_function_def_for_doc_note_list():
-    '''Testing for lack of syntax error - not actual documentation'''
-    functions = {
-        'close': {
-            'documentation': {
-                'description': 'test',
-                'note': ['test'],
-            },
-        },
-    }
-    config = {
-        'close_function': 'close'
-    }
-    close_doc = close_function_def_for_doc(functions, config)
-    assert type(close_doc) is dict
-    return
-
-
-def test_close_function_def_for_doc_no_note():
-    '''Testing for lack of syntax error - not actual documentation'''
-    functions = {
-        'close': {
-            'documentation': {
-                'description': 'test',
-            },
-        },
-    }
-    config = {
-        'close_function': 'close'
-    }
-    close_doc = close_function_def_for_doc(functions, config)
-    assert type(close_doc) is dict
-
-
-def test_initiate_function_def_for_doc_note_not_list():
-    '''Testing for lack of syntax error - not actual documentation'''
-    functions = {
-        'Initiate': {
-            'documentation': {
-                'description': 'test',
-                'note': 'test',
-            },
-            'python_name': '_initiate',
-        },
-    }
-    config = {
-        'context_manager_name': {
-            'task': 'acquisition',
-            'initiate_function': 'Initiate',
-            'abort_function': 'Abort',
-        },
-    }
-    initiate_doc = initiate_function_def_for_doc(functions, config)
-    assert type(initiate_doc) is dict
-    return
-
-
-def test_initiate_function_def_for_doc_note_list():
-    '''Testing for lack of syntax error - not actual documentation'''
-    functions = {
-        'Initiate': {
-            'documentation': {
-                'description': 'test',
-                'note': ['test'],
-            },
-            'python_name': '_initiate',
-        },
-    }
-    config = {
-        'context_manager_name': {
-            'task': 'acquisition',
-            'initiate_function': 'Initiate',
-            'abort_function': 'Abort',
-        },
-    }
-    initiate_doc = initiate_function_def_for_doc(functions, config)
-    assert type(initiate_doc) is dict
-    return
-
-
-def test_initiate_function_def_for_doc_no_note():
-    '''Testing for lack of syntax error - not actual documentation'''
-    functions = {
-        'Initiate': {
-            'documentation': {
-                'description': 'test',
-            },
-            'python_name': '_initiate',
-        },
-    }
-    config = {
-        'context_manager_name': {
-            'task': 'acquisition',
-            'initiate_function': 'Initiate',
-            'abort_function': 'Abort',
-        },
-    }
-    initiate_doc = initiate_function_def_for_doc(functions, config)
-    assert type(initiate_doc) is dict
-
-
-
diff --git a/build/helper/helper.py b/build/helper/helper.py
index 39521c266..6715bc768 100644
--- a/build/helper/helper.py
+++ b/build/helper/helper.py
@@ -151,137 +151,3 @@ def enum_uses_converter(enum):
     )
     return has_enum_to_converted_value_function_name and has_converted_value_to_enum_function_name
 
-
-# Tests
-def test_get_development_status():
-    config = {}
-
-    config['module_version'] = '0.0.0.dev0'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '0.0.0'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '0.4.9.dev0'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '0.4.9'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '0.5.0.dev0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '0.5.0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '0.9.9.dev0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '0.9.9'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '1.0.0.dev0'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '1.0.0.a0'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '1.0.0.b0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '1.0.0.c0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '1.0.0.rc0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '1.0.0'
-    assert get_development_status(config) == '5 - Production/Stable'
-
-    config['module_version'] = '1.9.9.dev0'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '1.9.9.a0'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '1.9.9.b0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '1.9.9.c0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '1.9.9.rc0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '1.9.9'
-    assert get_development_status(config) == '5 - Production/Stable'
-
-    config['module_version'] = '9.9.9.dev0'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '9.9.9.a0'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '9.9.9.b0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '9.9.9.c0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '9.9.9.rc0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '9.9.9'
-    assert get_development_status(config) == '5 - Production/Stable'
-
-    config['module_version'] = '19.9.9.dev0'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '19.9.9.a0'
-    assert get_development_status(config) == '3 - Alpha'
-
-    config['module_version'] = '19.9.9.b0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '19.9.9.c0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '19.9.9.rc0'
-    assert get_development_status(config) == '4 - Beta'
-
-    config['module_version'] = '19.9.9'
-    assert get_development_status(config) == '5 - Production/Stable'
-
-
-def test_enum_uses_converter():
-    import pytest
-
-    assert not enum_uses_converter({})
-    assert not enum_uses_converter({
-        'enum_to_converted_value_function_name': None,
-        'converted_value_to_enum_function_name': None
-    })
-
-    assert enum_uses_converter({
-        'enum_to_converted_value_function_name': lambda x: x,
-        'converted_value_to_enum_function_name': lambda x: x
-    })
-
-    with pytest.raises(AssertionError):
-        enum_uses_converter({
-            'enum_to_converted_value_function_name': lambda x: x
-        })
-    with pytest.raises(AssertionError):
-        enum_uses_converter({
-            'converted_value_to_enum_function_name': lambda x: x
-        })
-    with pytest.raises(AssertionError):
-        enum_uses_converter({
-            'enum_to_converted_value_function_name': None,
-            'converted_value_to_enum_function_name': lambda x: x
-        })
-    with pytest.raises(AssertionError):
-        enum_uses_converter({
-            'enum_to_converted_value_function_name': lambda x: x,
-            'converted_value_to_enum_function_name': None
-        })
diff --git a/build/helper/metadata_add_all.py b/build/helper/metadata_add_all.py
index 7c2dcdfda..11e89d907 100644
--- a/build/helper/metadata_add_all.py
+++ b/build/helper/metadata_add_all.py
@@ -783,1141 +783,3 @@ def add_all_metadata(functions, attributes, enums, config, persist_output=True):
 
     return config
 
-
-# Unit Tests
-def _compare_values(actual, expected, k):
-    if type(actual) is dict:
-        _compare_dicts(actual, expected)
-    elif type(actual) is list:
-        _compare_lists(actual, expected)
-    else:
-        assert actual == expected, "Value mismatch with key/index '{0}', {1} != {2}".format(k, actual, expected)
-
-
-def _compare_lists(actual, expected):
-    assert type(actual) == type(expected), 'Type mismatch, {0} != {1}'.format(type(actual), type(expected))
-    assert len(actual) == len(expected), 'Length mismatch, {0} != {1}'.format(len(actual), len(expected))
-    for k in range(len(actual)):
-        _compare_values(actual[k], expected[k], k)
-
-
-def _compare_dicts(actual, expected):
-    assert type(actual) == type(expected), 'Type mismatch, {0} != {1}'.format(type(actual), type(expected))
-    for k in actual:
-        assert k in expected, 'Key {0} not in expected'.format(k)
-        _compare_values(actual[k], expected[k], k)
-    for k in expected:
-        assert k in actual, 'Key {0} not in actual'.format(k)
-
-
-functions_input = {
-    'MakeAFoo': {
-        'codegen_method': 'public',
-        'returns': 'ViStatus',
-        'method_templates': [{'session_filename': '/cool_template', 'library_interpreter_filename': '/cool_template', 'documentation_filename': '/cool_template', 'method_python_name_suffix': '', }, ],
-        'parameters': [
-            {
-                'direction': 'in',
-                'enum': None,
-                'name': 'vi',
-                'type': 'ViSession',
-                'documentation': {
-                    'description': 'Identifies a particular instrument session.',
-                },
-            },
-            {
-                'direction': 'in',
-                'enum': None,
-                'name': 'channelName',
-                'python_name': 'name',
-                'is_repeated_capability': False,
-                'type': 'ViString',
-                'documentation': {
-                    'description': 'The channel to call this on.',
-                },
-            },
-            {
-                'direction': 'in',
-                'documentation': {
-                    'description': 'buffer size input',
-                },
-                'enum': None,
-                'name': 'pinDataBufferSize',
-                'type': 'ViInt32'
-            },
-            {
-                'direction': 'in',
-                'documentation': {
-                    'description': 'python-code input',
-                },
-                'enum': None,
-                'name': 'pythonCodeInput',
-                'size': {
-                    'mechanism': 'python-code',
-                    'value': '2 ** 14'
-                },
-                'type': 'ViInt32'
-            },
-            {
-                'direction': 'out',
-                'documentation': {
-                    'description': 'buffer size output',
-                },
-                'enum': None,
-                'name': 'actualNumPinData',
-                'type': 'ViInt32'
-            },
-            {
-                'direction': 'out',
-                'documentation': {
-                    'description': 'buffer',
-                },
-                'enum': None,
-                'name': 'expectedPinStates',
-                'size': {
-                    'mechanism': 'ivi-dance-with-a-twist',
-                    'value': 'pinDataBufferSize',
-                    'value_twist': 'actualNumPinData'
-                },
-                'type': 'ViUInt8[]'
-            },
-            {
-                'direction': 'in',
-                'documentation': {
-                    'description': 'custom type input',
-                },
-                'enum': None,
-                'name': 'customTypeInput',
-                'type': 'struct CustomStruct'
-            },
-            {
-                'direction': 'out',
-                'documentation': {
-                    'description': 'custom type output',
-                },
-                'enum': None,
-                'name': 'customTypeOutput',
-                'type': 'struct CustomStruct'
-            },
-            {
-                'direction': 'in',
-                'documentation': {
-                    'description': 'custom type without struct prefix input',
-                },
-                'enum': None,
-                'name': 'customTypeWithoutStructPrefixInput',
-                'type': 'CustomStruct'
-            },
-            {
-                'direction': 'out',
-                'documentation': {
-                    'description': 'custom type without struct prefix output',
-                },
-                'enum': None,
-                'name': 'customTypeWithoutStructPrefixOutput',
-                'type': 'CustomStruct'
-            },
-        ],
-        'documentation': {
-            'description': 'Performs a foo, and performs it well.',
-        },
-    },
-    'MakeAPrivateMethod': {
-        'codegen_method': 'private',
-        'returns': 'ViStatus',
-        'parameters': [
-            {
-                'direction': 'in',
-                'enum': None,
-                'name': 'vi',
-                'type': 'ViSession',
-                'documentation': {
-                    'description': 'Identifies a particular instrument session.',
-                },
-            },
-            {
-                'direction': 'out',
-                'enum': None,
-                'name': 'status',
-                'type': 'ViString',
-                'documentation': {
-                    'description': 'Return a device status',
-                },
-            },
-            {
-                'direction': 'in',
-                'documentation': {
-                    'description': 'buffer size',
-                },
-                'enum': None,
-                'name': 'dataBufferSize',
-                'type': 'ViInt32'
-            },
-            {
-                'direction': 'out',
-                'documentation': {
-                    'description': 'buffer',
-                },
-                'enum': None,
-                'name': 'data',
-                'size': {
-                    'mechanism': 'ivi-dance',
-                    'value': 'dataBufferSize'
-                },
-                'type': 'ViUInt32[]'
-            },
-        ],
-        'documentation': {
-            'description': 'Perform actions as method defined',
-        },
-    },
-    'MakeANoCodegenMethod': {
-        'codegen_method': 'no',
-        'documentation': {
-            'description': 'This is a method with codegen_method set to no',
-        },
-        'method_name_for_documentation': 'MakeAPublicMethod',
-        'method_templates': [
-            {
-                'session_filename': '/cool_template',
-                'library_interpreter_filename': '/cool_template',
-                'documentation_filename': '/cool_template',
-                'method_python_name_suffix': '',
-            },
-        ],
-        'parameters': [],
-        'returns': 'ViStatus',
-    },
-}
-
-
-functions_expected = {
-    'MakeAFoo': {
-        'name': 'MakeAFoo',
-        'codegen_method': 'public',
-        'use_session_lock': True,
-        'documentation': {
-            'description': 'Performs a foo, and performs it well.'
-        },
-        'has_repeated_capability': False,
-        'is_error_handling': False,
-        'render_in_session_base': False,
-        'method_templates': [{'session_filename': '/cool_template', 'library_interpreter_filename': '/cool_template', 'documentation_filename': '/cool_template', 'method_python_name_suffix': '', }, ],
-        'parameters': [
-            {
-                'ctypes_method_call_snippet': 'vi_ctype',
-                'ctypes_type': 'ViSession',
-                'ctypes_variable_name': 'vi_ctype',
-                'ctypes_type_library_call': 'ViSession',
-                'direction': 'in',
-                'documentation': {
-                    'description': 'Identifies a particular instrument session.'
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': True,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'int',
-                'type_in_documentation': 'int',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': False,
-                'name': 'vi',
-                'grpc_name': 'vi',
-                'python_name': 'vi',
-                'python_name_with_default': 'vi',
-                'python_name_with_doc_default': 'vi',
-                'size': {
-                    'mechanism': 'fixed',
-                    'value': 1
-                },
-                'type': 'ViSession',
-                'interpreter_method_call_snippet': 'self._vi',
-                'grpc_request_snippet': 'vi=self._vi',
-                'use_in_python_api': True,
-                'python_name_or_default_for_init': 'vi',
-            },
-            {
-                'ctypes_method_call_snippet': 'name_ctype',
-                'ctypes_type': 'ViString',
-                'ctypes_variable_name': 'name_ctype',
-                'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
-                'direction': 'in',
-                'documentation': {
-                    'description': 'The channel to call this on.'
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'str',
-                'type_in_documentation': 'str',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': True,
-                'name': 'channelName',
-                'grpc_name': 'name',
-                'python_name': 'name',
-                'python_name_with_default': 'name',
-                'python_name_with_doc_default': 'name',
-                'size': {'mechanism': 'fixed', 'value': 1},
-                'type': 'ViString',
-                'interpreter_method_call_snippet': 'name',
-                'grpc_request_snippet': 'name=name',
-                'use_in_python_api': True,
-                'python_name_or_default_for_init': 'name',
-            },
-            {
-                'ctypes_method_call_snippet': 'pin_data_buffer_size_ctype',
-                'ctypes_type': 'ViInt32',
-                'ctypes_variable_name': 'pin_data_buffer_size_ctype',
-                'ctypes_type_library_call': 'ViInt32',
-                'direction': 'in',
-                'documentation': {
-                    'description': 'buffer size input',
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'int',
-                'type_in_documentation': 'int',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': False,
-                'name': 'pinDataBufferSize',
-                'grpc_name': 'pin_data_buffer_size',
-                'python_name': 'pin_data_buffer_size',
-                'python_name_with_default': 'pin_data_buffer_size',
-                'python_name_with_doc_default': 'pin_data_buffer_size',
-                'size': {
-                    'mechanism': 'fixed',
-                    'value': 1
-                },
-                'type': 'ViInt32',
-                'interpreter_method_call_snippet': 'pin_data_buffer_size',
-                'grpc_request_snippet': 'pin_data_buffer_size=pin_data_buffer_size',
-                'use_in_python_api': False,
-                'python_name_or_default_for_init': 'pin_data_buffer_size',
-            },
-            {
-                'ctypes_method_call_snippet': 'python_code_input_ctype',
-                'ctypes_type': 'ViInt32',
-                'ctypes_variable_name': 'python_code_input_ctype',
-                'ctypes_type_library_call': 'ViInt32',
-                'direction': 'in',
-                'documentation': {
-                    'description': 'python-code input',
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'int',
-                'type_in_documentation': 'int',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': False,
-                'name': 'pythonCodeInput',
-                'grpc_name': 'python_code_input',
-                'python_name': 'python_code_input',
-                'python_name_with_default': 'python_code_input',
-                'python_name_with_doc_default': 'python_code_input',
-                'size': {
-                    'mechanism': 'python-code',
-                    'value': '2 ** 14'
-                },
-                'type': 'ViInt32',
-                'interpreter_method_call_snippet': 'python_code_input',
-                'grpc_request_snippet': 'python_code_input=2 ** 14',
-                'use_in_python_api': True,
-                'python_name_or_default_for_init': 'python_code_input',
-            },
-            {
-                'ctypes_method_call_snippet': 'None if actual_num_pin_data_ctype is None else (ctypes.pointer(actual_num_pin_data_ctype))',
-                'ctypes_type': 'ViInt32',
-                'ctypes_variable_name': 'actual_num_pin_data_ctype',
-                'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
-                'direction': 'out',
-                'documentation': {
-                    'description': 'buffer size output',
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'int',
-                'type_in_documentation': 'int',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': False,
-                'name': 'actualNumPinData',
-                'grpc_name': 'actual_num_pin_data',
-                'python_name': 'actual_num_pin_data',
-                'python_name_with_default': 'actual_num_pin_data',
-                'python_name_with_doc_default': 'actual_num_pin_data',
-                'size': {
-                    'mechanism': 'fixed',
-                    'value': 1
-                },
-                'type': 'ViInt32',
-                'interpreter_method_call_snippet': 'actual_num_pin_data',
-                'grpc_request_snippet': 'actual_num_pin_data=actual_num_pin_data',
-                'use_in_python_api': False,
-                'python_name_or_default_for_init': 'actual_num_pin_data',
-            },
-            {
-                'ctypes_method_call_snippet': 'expected_pin_states_ctype',
-                'ctypes_type': 'ViUInt8',
-                'ctypes_variable_name': 'expected_pin_states_ctype',
-                'ctypes_type_library_call': 'ctypes.POINTER(ViUInt8)',
-                'direction': 'out',
-                'documentation': {
-                    'description': 'buffer',
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'int',
-                'type_in_documentation': 'int',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': True,
-                'use_list': True,
-                'is_string': False,
-                'name': 'expectedPinStates',
-                'original_type': 'ViUInt8[]',
-                'grpc_name': 'expected_pin_states',
-                'python_name': 'expected_pin_states',
-                'python_name_with_default': 'expected_pin_states',
-                'python_name_with_doc_default': 'expected_pin_states',
-                'size': {
-                    'mechanism': 'ivi-dance-with-a-twist',
-                    'value': 'pinDataBufferSize',
-                    'value_twist': 'actualNumPinData'
-                },
-                'type': 'ViUInt8',
-                'interpreter_method_call_snippet': 'expected_pin_states',
-                'grpc_request_snippet': 'expected_pin_states=expected_pin_states',
-                'use_in_python_api': True,
-                'python_name_or_default_for_init': 'expected_pin_states',
-            },
-            {
-                'ctypes_method_call_snippet': 'custom_type_input_ctype',
-                'ctypes_type': 'struct_CustomStruct',
-                'ctypes_variable_name': 'custom_type_input_ctype',
-                'ctypes_type_library_call': 'custom_struct.struct_CustomStruct',
-                'direction': 'in',
-                'documentation': {
-                    'description': 'custom type input',
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'CustomStruct',
-                'type_in_documentation': 'CustomStruct',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': False,
-                'name': 'customTypeInput',
-                'grpc_name': 'custom_type_input',
-                'python_name': 'custom_type_input',
-                'python_name_with_default': 'custom_type_input',
-                'python_name_with_doc_default': 'custom_type_input',
-                'size': {
-                    'mechanism': 'fixed',
-                    'value': 1
-                },
-                'type': 'struct_CustomStruct',
-                'interpreter_method_call_snippet': 'custom_type_input',
-                'grpc_request_snippet': 'custom_type_input=custom_type_input._create_copy(grpc_types.CustomStruct)',
-                'use_in_python_api': True,
-                'python_name_or_default_for_init': 'custom_type_input',
-            },
-            {
-                'ctypes_method_call_snippet': 'None if custom_type_output_ctype is None else (ctypes.pointer(custom_type_output_ctype))',
-                'ctypes_type': 'struct_CustomStruct',
-                'ctypes_variable_name': 'custom_type_output_ctype',
-                'ctypes_type_library_call': 'ctypes.POINTER(custom_struct.struct_CustomStruct)',
-                'direction': 'out',
-                'documentation': {
-                    'description': 'custom type output',
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'CustomStruct',
-                'type_in_documentation': 'CustomStruct',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': False,
-                'name': 'customTypeOutput',
-                'grpc_name': 'custom_type_output',
-                'python_name': 'custom_type_output',
-                'python_name_with_default': 'custom_type_output',
-                'python_name_with_doc_default': 'custom_type_output',
-                'size': {
-                    'mechanism': 'fixed',
-                    'value': 1
-                },
-                'type': 'struct_CustomStruct',
-                'interpreter_method_call_snippet': 'custom_type_output',
-                'grpc_request_snippet': 'custom_type_output=custom_type_output._create_copy(grpc_types.CustomStruct)',
-                'use_in_python_api': True,
-                'python_name_or_default_for_init': 'custom_type_output',
-            },
-            {
-                'ctypes_method_call_snippet': 'custom_type_without_struct_prefix_input_ctype',
-                'ctypes_type': 'struct_CustomStruct',
-                'ctypes_variable_name': 'custom_type_without_struct_prefix_input_ctype',
-                'ctypes_type_library_call': 'custom_struct.struct_CustomStruct',
-                'direction': 'in',
-                'documentation': {
-                    'description': 'custom type without struct prefix input',
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'CustomStruct',
-                'type_in_documentation': 'CustomStruct',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': False,
-                'name': 'customTypeWithoutStructPrefixInput',
-                'grpc_name': 'custom_type_without_struct_prefix_input',
-                'python_name': 'custom_type_without_struct_prefix_input',
-                'python_name_with_default': 'custom_type_without_struct_prefix_input',
-                'python_name_with_doc_default': 'custom_type_without_struct_prefix_input',
-                'size': {
-                    'mechanism': 'fixed',
-                    'value': 1
-                },
-                'type': 'struct_CustomStruct',
-                'interpreter_method_call_snippet': 'custom_type_without_struct_prefix_input',
-                'grpc_request_snippet': 'custom_type_without_struct_prefix_input=custom_type_without_struct_prefix_input._create_copy(grpc_types.CustomStruct)',
-                'use_in_python_api': True,
-                'python_name_or_default_for_init': 'custom_type_without_struct_prefix_input',
-            },
-            {
-                'ctypes_method_call_snippet': 'None if custom_type_without_struct_prefix_output_ctype is None else (ctypes.pointer(custom_type_without_struct_prefix_output_ctype))',
-                'ctypes_type': 'struct_CustomStruct',
-                'ctypes_variable_name': 'custom_type_without_struct_prefix_output_ctype',
-                'ctypes_type_library_call': 'ctypes.POINTER(custom_struct.struct_CustomStruct)',
-                'direction': 'out',
-                'documentation': {
-                    'description': 'custom type without struct prefix output',
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'CustomStruct',
-                'type_in_documentation': 'CustomStruct',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': False,
-                'name': 'customTypeWithoutStructPrefixOutput',
-                'grpc_name': 'custom_type_without_struct_prefix_output',
-                'python_name': 'custom_type_without_struct_prefix_output',
-                'python_name_with_default': 'custom_type_without_struct_prefix_output',
-                'python_name_with_doc_default': 'custom_type_without_struct_prefix_output',
-                'size': {
-                    'mechanism': 'fixed',
-                    'value': 1
-                },
-                'type': 'struct_CustomStruct',
-                'interpreter_method_call_snippet': 'custom_type_without_struct_prefix_output',
-                'grpc_request_snippet': 'custom_type_without_struct_prefix_output=custom_type_without_struct_prefix_output._create_copy(grpc_types.CustomStruct)',
-                'use_in_python_api': True,
-                'python_name_or_default_for_init': 'custom_type_without_struct_prefix_output',
-            },
-        ],
-        'python_name': 'make_a_foo',
-        'interpreter_name': 'make_a_foo',
-        'returns': 'ViStatus',
-    },
-    'MakeAPrivateMethod': {
-        'codegen_method': 'private',
-        'returns': 'ViStatus',
-        'use_session_lock': True,
-        'method_templates': [{'session_filename': '/default_method', 'library_interpreter_filename': '/default_method', 'documentation_filename': '/default_method', 'method_python_name_suffix': '', }, ],
-        'parameters': [
-            {
-                'ctypes_method_call_snippet': 'vi_ctype',
-                'direction': 'in',
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'name': 'vi',
-                'type': 'ViSession',
-                'documentation': {
-                    'description': 'Identifies a particular instrument session.'
-                },
-                'grpc_name': 'vi',
-                'python_name': 'vi',
-                'python_type': 'int',
-                'type_in_documentation': 'int',
-                'type_in_documentation_was_calculated': True,
-                'ctypes_variable_name': 'vi_ctype',
-                'ctypes_type': 'ViSession',
-                'ctypes_type_library_call': 'ViSession',
-                'size': {
-                    'mechanism': 'fixed',
-                    'value': 1
-                },
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': False,
-                'python_name_with_default': 'vi',
-                'python_name_with_doc_default': 'vi',
-                'is_repeated_capability': False,
-                'is_session_handle': True,
-                'interpreter_method_call_snippet': 'self._vi',
-                'grpc_request_snippet': 'vi=self._vi',
-                'use_in_python_api': True,
-                'python_name_or_default_for_init': 'vi',
-            },
-            {
-                'ctypes_method_call_snippet': 'status_ctype',
-                'direction': 'out',
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'name': 'status',
-                'type': 'ViString',
-                'documentation': {
-                    'description': 'Return a device status'
-                },
-                'grpc_name': 'status',
-                'python_name': 'status',
-                'python_type': 'str',
-                'type_in_documentation': 'str',
-                'type_in_documentation_was_calculated': True,
-                'ctypes_variable_name': 'status_ctype',
-                'ctypes_type': 'ViString',
-                'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
-                'size': {
-                    'mechanism': 'fixed',
-                    'value': 1
-                },
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': True,
-                'python_name_with_default': 'status',
-                'python_name_with_doc_default': 'status',
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'interpreter_method_call_snippet': 'status',
-                'grpc_request_snippet': 'status=status',
-                'use_in_python_api': True,
-                'python_name_or_default_for_init': 'status',
-            },
-            {
-                'ctypes_method_call_snippet': 'data_buffer_size_ctype',
-                'ctypes_type': 'ViInt32',
-                'ctypes_variable_name': 'data_buffer_size_ctype',
-                'ctypes_type_library_call': 'ViInt32',
-                'direction': 'in',
-                'documentation': {
-                    'description': 'buffer size',
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'int',
-                'type_in_documentation': 'int',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': False,
-                'use_list': False,
-                'is_string': False,
-                'name': 'dataBufferSize',
-                'grpc_name': 'data_buffer_size',
-                'python_name': 'data_buffer_size',
-                'python_name_with_default': 'data_buffer_size',
-                'python_name_with_doc_default': 'data_buffer_size',
-                'size': {
-                    'mechanism': 'fixed',
-                    'value': 1
-                },
-                'type': 'ViInt32',
-                'interpreter_method_call_snippet': 'data_buffer_size',
-                'grpc_request_snippet': 'data_buffer_size=data_buffer_size',
-                'use_in_python_api': False,
-                'python_name_or_default_for_init': 'data_buffer_size',
-            },
-            {
-                'ctypes_method_call_snippet': 'data_ctype',
-                'ctypes_type': 'ViUInt32',
-                'ctypes_variable_name': 'data_ctype',
-                'ctypes_type_library_call': 'ctypes.POINTER(ViUInt32)',
-                'direction': 'out',
-                'documentation': {
-                    'description': 'buffer',
-                },
-                'is_repeated_capability': False,
-                'is_session_handle': False,
-                'enum': None,
-                'grpc_enum': None,
-                'numpy': False,
-                'python_type': 'int',
-                'type_in_documentation': 'int',
-                'type_in_documentation_was_calculated': True,
-                'use_array': False,
-                'is_buffer': True,
-                'use_list': True,
-                'is_string': False,
-                'name': 'data',
-                'original_type': 'ViUInt32[]',
-                'grpc_name': 'data',
-                'python_name': 'data',
-                'python_name_with_default': 'data',
-                'python_name_with_doc_default': 'data',
-                'size': {
-                    'mechanism': 'ivi-dance',
-                    'value': 'dataBufferSize',
-                },
-                'type': 'ViUInt32',
-                'interpreter_method_call_snippet': 'data',
-                'grpc_request_snippet': 'data=data',
-                'use_in_python_api': True,
-                'python_name_or_default_for_init': 'data',
-            },
-        ],
-        'documentation': {
-            'description': 'Perform actions as method defined'
-        },
-        'name': 'MakeAPrivateMethod',
-        'python_name': '_make_a_private_method',
-        'interpreter_name': 'make_a_private_method',
-        'is_error_handling': False,
-        'render_in_session_base': False,
-        'has_repeated_capability': False
-    },
-    'MakeANoCodegenMethod': {
-        'name': 'MakeANoCodegenMethod',
-        'codegen_method': 'no',
-        'method_name_for_documentation': 'MakeAPublicMethod',
-        'use_session_lock': True,
-        'documentation': {
-            'description': 'This is a method with codegen_method set to no'
-        },
-        'has_repeated_capability': False,
-        'is_error_handling': False,
-        'render_in_session_base': False,
-        'method_templates': [
-            {
-                'session_filename': '/cool_template',
-                'library_interpreter_filename': '/cool_template',
-                'documentation_filename': '/cool_template',
-                'method_python_name_suffix': ''
-            }
-        ],
-        'parameters': [],
-        'python_name': 'make_a_no_codegen_method',
-        'interpreter_name': 'make_a_no_codegen_method',
-        'returns': 'ViStatus',
-    }
-}
-
-
-attributes_input = {
-    1000000: {
-        'access': 'read-write',
-        'enum': None,
-        'lv_property': 'Fake attributes:Read Write Bool',
-        'name': 'READ_WRITE_BOOL',
-        'type': 'ViBoolean',
-        'documentation': {
-            'description': 'An attribute of type bool with read/write access.',
-        },
-    },
-}
-
-
-attributes_expected = {
-    1000000: {
-        'access': 'read-write',
-        'codegen_method': 'public',
-        'documentation': {'description': 'An attribute of type bool with read/write access.'},
-        'enum': None,
-        'grpc_enum': None,
-        'lv_property': 'Fake attributes:Read Write Bool',
-        'name': 'READ_WRITE_BOOL',
-        'python_name': 'read_write_bool',
-        'type': 'ViBoolean',
-        'python_type': 'bool',
-        'type_in_documentation': 'bool',
-        'type_in_documentation_was_calculated': True,
-        'attribute_class': 'AttributeViBoolean',
-    },
-}
-
-
-enums_input = {
-    'Color': {
-        'values': [
-            {
-                'name': 'RED',
-                'value': 1,
-                'documentation': {
-                    'description': 'Like blood.',
-                }
-            },
-            {
-                'name': 'BLUE',
-                'value': 2,
-                'documentation': {
-                    'description': 'Like the sky.',
-                }
-            },
-            {
-                'name': 'YELLOW',
-                'value': 2,
-                'documentation': {
-                    'description': 'Like a banana.',
-                }
-            },
-            {
-                'name': 'BLACK',
-                'value': 2,
-                'documentation': {
-                    'description': 'Like this developer\'s conscience.',
-                }
-            },
-        ],
-    },
-    'EnumWithConverter': {
-        'codegen_method': 'private',
-        'converted_value_to_enum_function_name': 'convert_to_enum_with_converter_enum',
-        'enum_to_converted_value_function_name': 'convert_from_enum_with_converter_enum',
-        'values': [
-            {
-                'converts_to_value': True,
-                'name': 'RED',
-                'value': 1
-            },
-            {
-                'converts_to_value': False,
-                'name': 'BLUE',
-                'value': 2
-            },
-            {
-                'converts_to_value': 'yellow',
-                'name': 'YELLOW',
-                'value': 5
-            },
-            {
-                'converts_to_value': 42,
-                'name': 'BLACK',
-                'value': 42
-            }
-        ]
-    },
-}
-
-
-enums_expected = {
-    'Color': {
-        'codegen_method': 'no',
-        'python_name': 'Color',
-        'values': [
-            {'documentation': {'description': 'Like blood.'}, 'name': 'RED', 'value': 1, 'python_name': 'RED'},
-            {'documentation': {'description': 'Like the sky.'}, 'name': 'BLUE', 'value': 2, 'python_name': 'BLUE'},
-            {'documentation': {'description': 'Like a banana.'}, 'name': 'YELLOW', 'value': 2, 'python_name': 'YELLOW'},
-            {'documentation': {'description': "Like this developer's conscience."}, 'name': 'BLACK', 'value': 2, 'python_name': 'BLACK'}
-        ]
-    },
-    'EnumWithConverter': {
-        'codegen_method': 'private',
-        'python_name': '_EnumWithConverter',
-        'converted_value_to_enum_function_name': 'convert_to_enum_with_converter_enum',
-        'enum_to_converted_value_function_name': 'convert_from_enum_with_converter_enum',
-        'values': [
-            {'name': 'RED', 'value': 1, 'converts_to_value': True, 'python_name': 'RED'},
-            {'name': 'BLUE', 'value': 2, 'converts_to_value': False, 'python_name': 'BLUE'},
-            {'name': 'YELLOW', 'value': 5, 'converts_to_value': 'yellow', 'python_name': 'YELLOW'},
-            {'name': 'BLACK', 'value': 42, 'converts_to_value': 42, 'python_name': 'BLACK'}
-        ]
-    },
-}
-
-
-config_input = {
-    'metadata_version': '1.0',
-    'module_name': 'nifake',
-    'module_version': '1.1.1.dev0',
-    'c_function_prefix': 'niFake_',
-    'driver_name': 'NI-FAKE',
-    'session_class_description': 'An NI-FAKE session to a fake MI driver whose sole purpose is to test nimi-python code generation',
-    'session_handle_parameter_name': 'vi',
-    'library_info':
-    {
-        'Windows': {
-            '32bit': {'name': 'nifake_32.dll', 'type': 'windll'},
-            '64bit': {'name': 'nifake_64.dll', 'type': 'cdll'},
-        },
-        'Linux': {
-            '64bit': {'name': 'libnifake.so', 'type': 'cdll'},
-        },
-    },
-    'context_manager_name': {
-        'task': 'acquisition',
-        'initiate_function': 'Initiate',
-        'abort_function': 'Abort',
-    },
-    'init_function': 'InitWithOptions',
-    'close_function': 'close',
-    'custom_types': [
-        {
-            'ctypes_type': 'struct_CustomStruct',
-            'file_name': 'custom_struct',
-            'grpc_name': 'CustomStruct',
-            'python_name': 'CustomStruct',
-        },
-    ],
-    'enum_whitelist_suffix': ['_POINT_FIVE'],
-    'repeated_capabilities': [
-        {'python_name': 'channels', 'prefix': '', },
-    ],
-    # These are added here strictly for testing.
-    'functions': {},
-    'attributes': {},
-    'modules': {
-        'metadata.enums_addon': {}
-    },
-}
-
-
-config_expected = {
-    'metadata_version': '1.0',
-    'module_name': 'nifake',
-    'module_version': '1.1.1.dev0',
-    'c_function_prefix': 'niFake_',
-    'driver_name': 'NI-FAKE',
-    'session_class_description': 'An NI-FAKE session to a fake MI driver whose sole purpose is to test nimi-python code generation',
-    'session_handle_parameter_name': 'vi',
-    'library_info':
-    {
-        'Windows': {
-            '32bit': {'name': 'nifake_32.dll', 'type': 'windll'},
-            '64bit': {'name': 'nifake_64.dll', 'type': 'cdll'},
-        },
-        'Linux': {
-            '64bit': {'name': 'libnifake.so', 'type': 'cdll'},
-        },
-    },
-    'context_manager_name': {
-        'task': 'acquisition',
-        'initiate_function': 'Initiate',
-        'abort_function': 'Abort',
-    },
-    'init_function': 'InitWithOptions',
-    'close_function': 'close',
-    'custom_types': [
-        {
-            'ctypes_type': 'struct_CustomStruct',
-            'file_name': 'custom_struct',
-            'grpc_name': 'CustomStruct',
-            'python_name': 'CustomStruct',
-        },
-    ],
-    'enum_whitelist_suffix': ['_POINT_FIVE'],
-    'repeated_capabilities': [
-        {'python_name': 'channels', 'prefix': '', },
-    ],
-    'use_locking': True,
-    'functions': functions_expected,
-    'attributes': attributes_expected,
-    'enums': enums_expected,
-    'modules': {
-        'metadata.enums_addon': {}
-    },
-    'uses_nitclk': False,
-}
-
-
-def _do_the_test_add_functions_metadata(functions, expected):
-    actual = copy.deepcopy(functions)
-    actual = add_all_function_metadata(actual, config_input)
-    _compare_dicts(actual, expected)
-
-
-def test_add_functions_metadata_simple():
-    _do_the_test_add_functions_metadata(functions=functions_input, expected=functions_expected)
-
-
-def _do_the_test_add_attributes_metadata(attributes, expected):
-    actual = copy.deepcopy(attributes)
-    actual = add_all_attribute_metadata(actual, config_input)
-    _compare_dicts(actual, expected)
-
-
-def test_add_attributes_metadata_simple():
-    _do_the_test_add_attributes_metadata(attributes=attributes_input, expected=attributes_expected)
-
-
-def _do_the_test_add_enums_metadata(enums, expected):
-    actual = copy.deepcopy(enums)
-    actual = add_all_enum_metadata(actual, config_input)
-    _compare_dicts(actual, expected)
-
-
-def test_add_enums_metadata_simple():
-    _do_the_test_add_enums_metadata(enums_input, expected=enums_expected)
-
-
-def _do_the_test_add_all_metadata(functions, attributes, enums, config, expected):
-    actual = add_all_metadata(functions, attributes, enums, config, persist_output=False)
-    _compare_dicts(actual, expected)
-
-
-def test_add_all_metadata_defaults():
-    actual_functions = copy.deepcopy(functions_input)
-    actual_attributes = copy.deepcopy(attributes_input)
-    actual_enums = copy.deepcopy(enums_input)
-    actual_config = copy.deepcopy(config_input)
-    _do_the_test_add_all_metadata(
-        functions=actual_functions,
-        attributes=actual_attributes,
-        enums=actual_enums,
-        config=actual_config,
-        expected=config_expected)
-
-
-def test_add_all_metadata():
-    actual_functions = copy.deepcopy(functions_input)
-    actual_attributes = copy.deepcopy(attributes_input)
-    actual_enums = copy.deepcopy(enums_input)
-    actual_config = copy.deepcopy(config_input)
-    actual_config['use_locking'] = False
-    expected = copy.deepcopy(config_expected)
-    expected['use_locking'] = False
-    _do_the_test_add_all_metadata(
-        functions=actual_functions,
-        attributes=actual_attributes,
-        enums=actual_enums,
-        config=actual_config,
-        expected=expected)
-
-
-def _setup_inputs_for_enum_codegen_method_tests():
-    actual_enums = copy.deepcopy(enums_input)
-    actual_config = copy.deepcopy(config_input)
-    # Set up minimal input functions metadata
-    actual_config['functions'] = {
-        'PublicMethod': {
-            'codegen_method': 'public',
-            'parameters': [{'enum': None}, {'enum': 'EnumWithConverter'}],
-        },
-        'PythonOnlyMethod': {
-            'codegen_method': 'python-only',
-            'parameters': [{'enum': 'Color'}, {'enum': None}],
-        },
-        'PrivateMethod': {
-            'codegen_method': 'private',
-            'parameters': [{'enum': 'EnumWithConverter'}],
-        },
-        'NoCodegenMethod': {
-            'codegen_method': 'no',
-            'parameters': [{'enum': 'Color'}],
-        },
-    }
-    # Set up minimal input attributes metadata
-    actual_config['attributes'] = {
-        '1000000': {'codegen_method': 'public', 'name': 'PUBLIC_ATTR', 'enum': None},
-        '1000001': {'codegen_method': 'public', 'name': 'PUBLIC_ATTR_2', 'enum': 'EnumWithConverter'},
-        '1000002': {'codegen_method': 'private', 'name': 'PRIVATE_ATTR', 'enum': 'Color'},
-        '1000003': {'codegen_method': 'private', 'name': 'PRIVATE_ATTR_2', 'enum': 'EnumWithConverter'},
-        '1000004': {'codegen_method': 'no', 'name': 'NO_CODEGEN_ATTR', 'enum': 'Color'},
-    }
-    return actual_enums, actual_config
-
-
-def test_add_enum_codegen_method():
-    actual_enums, actual_config = _setup_inputs_for_enum_codegen_method_tests()
-    _add_enum_codegen_method(actual_enums, actual_config)
-    assert actual_enums['Color']['codegen_method'] == 'public'
-    assert actual_enums['EnumWithConverter']['codegen_method'] == 'private'
-
-
-def test_add_enum_codegen_method_error():
-    actual_enums, actual_config = _setup_inputs_for_enum_codegen_method_tests()
-    actual_enums['Color']['codegen_method'] = 'private'
-    expected_error_description = "Codegen_method of enum Color used by functions ['PythonOnlyMethod'] and attributes ['PRIVATE_ATTR'] must be public, is private"
-    try:
-        _add_enum_codegen_method(actual_enums, actual_config)
-    except ValueError as actual_error:
-        actual_error_message = actual_error.args[0]
-        assert actual_error_message == expected_error_description
-
-
-def test_get_functions_that_use_enums():
-    actual_enums, actual_config = _setup_inputs_for_enum_codegen_method_tests()
-    expected_output = {
-        'Color': ['PythonOnlyMethod'],
-        'EnumWithConverter': ['PublicMethod', 'PrivateMethod'],
-    }
-    actual_output = _get_functions_that_use_enums(actual_enums, actual_config)
-    _compare_dicts(actual_output, expected_output)
-
-
-def test_get_attributes_that_use_enums():
-    actual_enums, actual_config = _setup_inputs_for_enum_codegen_method_tests()
-    expected_output = {
-        'Color': ['1000002'],
-        'EnumWithConverter': ['1000001', '1000003'],
-    }
-    actual_output = _get_attributes_that_use_enums(actual_enums, actual_config)
-    _compare_dicts(actual_output, expected_output)
-
-
-def test_get_least_restrictive_codegen_method():
-    for codegen_methods, expected_least_restrictive_codegen_method in (
-        ([], 'no'),
-        (['no'], 'no'),
-        (['private', 'private'], 'private'),
-        (['no', 'private'], 'private'),
-        (['public', 'private'], 'public'),
-        (['private', 'python-only', 'private', 'no'], 'public'),
-        (['public', 'python-only', 'public'], 'public')
-    ):
-        assert _get_least_restrictive_codegen_method(
-            codegen_methods
-        ) == expected_least_restrictive_codegen_method
diff --git a/build/helper/metadata_merge_dicts.py b/build/helper/metadata_merge_dicts.py
index 5f66677a4..2615d3617 100644
--- a/build/helper/metadata_merge_dicts.py
+++ b/build/helper/metadata_merge_dicts.py
@@ -69,70 +69,3 @@ def merge_dicts(into, outof, use_re, dict_name):
         else:
             into[item] = outof[item]
 
-
-# Unit Tests
-def _do_the_test_merge_dicts(a, b, expected, use_re):
-    actual = a.copy()
-    merge_dicts(actual, b, use_re, 'test')
-    assert expected == actual, "\na = {0}\nb = {1}\nexpected = {2}\nactual = {3}".format(a, b, expected, actual)
-
-
-def test_merge_dict_second_is_empty():
-    a = {'a': 1, 'b': 2}
-    b = {}
-    expected = {'a': 1, 'b': 2}
-    _do_the_test_merge_dicts(a, b, expected, use_re=True)
-
-
-def test_merge_dict_key_exists():
-    a = {'a': 1, 'b': 2}
-    b = {'b': 3}
-    expected = {'a': 1, 'b': 3}
-    _do_the_test_merge_dicts(a, b, expected, use_re=True)
-
-
-def test_merge_dict_recurse():
-    a = {'a': 1, 'b': {'b1': 5, 'b2': 6}}
-    b = {'b': {'b3': 7}}
-    expected = {'a': 1, 'b': {'b1': 5, 'b2': 6, 'b3': 7}}
-    _do_the_test_merge_dicts(a, b, expected, use_re=True)
-
-
-def test_merge_dict_replace_in_list():
-    a = {'a': 1, 'b': {'b1': 5, 'b2': 6}, 'c': ['x', 'y', 'z']}
-    b = {'b': {'b3': 7, 'b1': 8}, 'c': {0: 'r', 1: 's', 2: 't'}}
-    expected = {'a': 1, 'b': {'b1': 8, 'b2': 6, 'b3': 7}, 'c': ['r', 's', 't']}
-    _do_the_test_merge_dicts(a, b, expected, use_re=True)
-
-
-def test_merge_dict_replace_in_dict_and_list():
-    a = {'a': 1, 'b': {'b1': 2, 'b2': 3}, 'c': ['x', 'y', 'z']}
-    b = {'b': {'b3': 7, 'b1': 8}, 'c': {0: 'r', 1: 's', 2: 't'}}
-    expected = {'a': 1, 'b': {'b1': 8, 'b2': 3, 'b3': 7}, 'c': ['r', 's', 't']}
-    _do_the_test_merge_dicts(a, b, expected, use_re=True)
-
-
-def test_merge_dict_with_regex():
-    a = {'aaa': {}, 'aaaa': {'x': 98}, 'aaaaa': {}, 'bbb': {'bbb1': 2, 'bbb2': 3}, 'ccc': ['x', 'y', 'z']}
-    b = {'a+': {'z': 99}}
-    expected = {'aaa': {'z': 99}, 'aaaa': {'x': 98, 'z': 99}, 'aaaaa': {'z': 99}, 'bbb': {'bbb1': 2, 'bbb2': 3}, 'ccc': ['x', 'y', 'z']}
-    _do_the_test_merge_dicts(a, b, expected, use_re=True)
-
-
-def test_merge_dict_with_regex_off():
-    a = {'aaa': {}, 'aaaa': {'x': 98}, 'aaaaa': {}, 'bbb': {'bbb1': 2, 'bbb2': 3}, 'ccc': ['x', 'y', 'z']}
-    b = {'aaa': {'z': 99}}
-    expected = {'aaa': {'z': 99}, 'aaaa': {'x': 98}, 'aaaaa': {}, 'bbb': {'bbb1': 2, 'bbb2': 3}, 'ccc': ['x', 'y', 'z']}
-    _do_the_test_merge_dicts(a, b, expected, use_re=False)
-
-
-def test_merge_dict_top_level_key_missing():
-    a = {'a': 1, 'b': 2}
-    b = {'b': 3, 'c': 4}
-    expected = {'a': 1, 'b': 3, 'c': 4}
-    try:
-        _do_the_test_merge_dicts(a, b, expected, use_re=True)
-        assert False
-    except KeyError:
-        pass
-
diff --git a/tox-travis.ini b/tox-travis.ini
index da75d0018..c3cd4f434 100644
--- a/tox-travis.ini
+++ b/tox-travis.ini
@@ -41,14 +41,17 @@ commands =
     build_test: python -c "import platform; print(platform.architecture())"
     build_test: python -m pip install --disable-pip-version-check --upgrade pip
     build_test: python -m pip list
+    # doctest validation of code docstrings
     build_test: coverage run --rcfile=tools/coverage_unit_tests.rc --source build.helper -m pytest --pyargs build.helper
+    # actual unit tests
+    build_test: coverage run --append --rcfile=tools/coverage_unit_tests.rc --source build.helper -m pytest build/unit_tests {posargs} -s
     # Display the report on console
     build_test: coverage report
     # Create the report to upload
     build_test: coverage xml -o codegen.xml
     # Save the report
     build_test: coverage html --directory=generated/htmlcov/unit_tests/codegen
-    build_test: flake8 --config=./tox.ini build/
+    build_test: flake8 --config=./tox.ini --per-file-ignores=build/unit_tests/*.py:F403,F405 build/
     test: python --version
     test: python -c "import platform; print(platform.architecture())"
     test: python -m pip install --disable-pip-version-check --upgrade pip
diff --git a/tox.ini b/tox.ini
index 3f82bd6ef..f02a42ce7 100644
--- a/tox.ini
+++ b/tox.ini
@@ -41,14 +41,17 @@ commands =
     build_test: python -c "import platform; print(platform.architecture())"
     build_test: python -m pip install --disable-pip-version-check --upgrade pip
     build_test: python -m pip list
+    # doctest validation of code docstrings
     build_test: coverage run --rcfile=tools/coverage_unit_tests.rc --source build.helper -m pytest --pyargs build.helper
+    # actual unit tests
+    build_test: coverage run --append --rcfile=tools/coverage_unit_tests.rc --source build.helper -m pytest build/unit_tests {posargs} -s
     # Display the report on console
     build_test: coverage report
     # Create the report to upload
     build_test: coverage xml -o codegen.xml
     # Save the report
     build_test: coverage html --directory=generated/htmlcov/unit_tests/codegen
-    build_test: flake8 --config=./tox.ini build/
+    build_test: flake8 --config=./tox.ini --per-file-ignores=build/unit_tests/*.py:F403,F405 build/
     test: python --version
     test: python -c "import platform; print(platform.architecture())"
     test: python -m pip install --disable-pip-version-check --upgrade pip


Test patch:
diff --git a/build/unit_tests/test_codegen_helper.py b/build/unit_tests/test_codegen_helper.py
new file mode 100644
index 000000000..05799b4f1
--- /dev/null
+++ b/build/unit_tests/test_codegen_helper.py
@@ -0,0 +1,1325 @@
+from build.helper.codegen_helper import *
+from build.helper.codegen_helper import _get_buffer_parameters_for_size_parameter
+
+# We need a config object for our testing
+config_for_testing = {
+    'session_handle_parameter_name': 'vi',
+    'module_name': 'nifake',
+    'functions': {},
+    'attributes': {},
+    'modules': {
+        'metadata.enums_addon': {}
+    },
+    'custom_types': [
+        {'file_name': 'custom_struct', 'python_name': 'CustomStruct', 'ctypes_type': 'custom_struct', },
+    ],
+}
+
+
+# We also need some function parameters that cover all cases.
+parameters_for_testing = [
+    {  # 0
+        'ctypes_method_call_snippet': 'vi_ctype',
+        'ctypes_type': 'ViSession',
+        'ctypes_type_library_call': 'ViSession',
+        'ctypes_variable_name': 'vi_ctype',
+        'direction': 'in',
+        'documentation': {'description': 'Identifies a particular instrument session.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'vi',
+        'is_buffer': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': True,
+        'interpreter_method_call_snippet': 'self._vi',
+        'name': 'vi',
+        'python_name': 'vi',
+        'python_name_with_default': 'vi',
+        'python_name_with_doc_default': 'vi',
+        'python_type': 'int',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViSession',
+        'numpy': False,
+        'use_in_python_api': True,
+    },
+    {  # 1
+        'ctypes_method_call_snippet': 'ctypes.pointer(output_ctype)',
+        'ctypes_type': 'ViInt64',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViInt64)',
+        'ctypes_variable_name': 'output_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'A big number on its way out.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'output',
+        'is_buffer': False,
+        'is_string': False,
+        'use_array': False,
+        'use_list': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'output',
+        'name': 'output',
+        'python_name': 'output',
+        'python_name_with_default': 'output',
+        'python_name_with_doc_default': 'output',
+        'python_type': 'int',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViInt64',
+        'numpy': False,
+        'use_in_python_api': True,
+    },
+    {  # 2
+        'ctypes_method_call_snippet': 'error_message_ctype',
+        'ctypes_type': 'ViString',
+        'ctypes_type_library_call': 'ViString',
+        'ctypes_variable_name': 'error_message_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'The error information formatted into a string.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'error_message',
+        'is_buffer': False,
+        'use_array': False,
+        'use_list': False,
+        'is_string': True,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'error_message',
+        'name': 'errorMessage',
+        'python_name': 'error_message',
+        'python_name_with_default': 'error_message',
+        'python_name_with_doc_default': 'error_message',
+        'python_type': 'str',
+        'size': {'mechanism': 'fixed', 'value': 256},
+        'type': 'ViString',
+        'numpy': False,
+        'use_in_python_api': True,
+    },
+    {  # 3
+        'ctypes_method_call_snippet': 'array_out_ctype',
+        'ctypes_type': 'custom_struct',
+        'ctypes_type_library_call': 'ctypes.POINTER(custom_struct)',
+        'ctypes_variable_name': 'array_out_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'Array of custom type using python-code size mechanism'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'array_out',
+        'is_buffer': True,
+        'use_array': False,
+        'use_list': True,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'array_out',
+        'name': 'arrayOut',
+        'original_type': 'custom_struct[]',
+        'python_name': 'array_out',
+        'python_name_with_default': 'array_out',
+        'python_name_with_doc_default': 'array_out',
+        'python_type': 'CustomStruct',
+        'size': {'mechanism': 'python-code', 'value': 'self.get_array_size_for_python_code()'},
+        'type': 'custom_struct',
+        'numpy': False,
+        'use_in_python_api': True,
+    },
+    {  # 4
+        'ctypes_method_call_snippet': 'number_of_elements_ctype',
+        'ctypes_type': 'ViInt32',
+        'ctypes_type_library_call': 'ViInt32',
+        'ctypes_variable_name': 'number_of_elements_ctype',
+        'direction': 'in',
+        'documentation': {'description': 'Number of elements in the array.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'number_of_elements',
+        'is_buffer': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'number_of_elements',
+        'name': 'numberOfElements',
+        'python_name': 'number_of_elements',
+        'python_name_with_default': 'number_of_elements',
+        'python_name_with_doc_default': 'number_of_elements',
+        'python_type': 'int',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViInt32',
+        'numpy': False,
+        'use_in_python_api': True,
+    },
+    {  # 5
+        'ctypes_method_call_snippet': 'an_array_ctype',
+        'ctypes_type': 'ViInt16',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViInt16)',
+        'ctypes_variable_name': 'an_array_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'Contains an array of enums, stored as 16 bit integers under the hood '},
+        'enum': 'Turtle',
+        'grpc_enum': 'Turtle',
+        'grpc_name': 'an_array_raw',
+        'is_buffer': True,
+        'use_array': False,
+        'use_list': True,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'an_array',
+        'name': 'anArray',
+        'python_name': 'an_array',
+        'python_name_with_default': 'an_array',
+        'python_name_with_doc_default': 'an_array',
+        'python_type': 'enums.Turtle',
+        'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'},
+        'type': 'ViInt16',
+        'numpy': False,
+        'use_in_python_api': True,
+    },
+    {  # 6
+        'ctypes_method_call_snippet': 'an_int_enum_ctype',
+        'ctypes_type': 'ViInt16',
+        'ctypes_type_library_call': 'ViInt16',
+        'ctypes_variable_name': 'an_int_enum_ctype',
+        'direction': 'in',
+        'documentation': {
+            'description': 'Indicates a ninja turtle',
+            'table_body': [['0', 'Leonardo'], ['1', 'Donatello'], ['2', 'Raphael'], ['3', 'Mich elangelo']]
+        },
+        'enum': 'Turtle',
+        'grpc_enum': 'Turtle',
+        'grpc_name': 'an_int_enum_raw',
+        'is_buffer': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'an_int_enum',
+        'name': 'anIntEnum',
+        'python_name': 'an_int_enum',
+        'python_name_with_default': 'an_int_enum',
+        'python_name_with_doc_default': 'an_int_enum',
+        'python_type': 'enums.Turtle',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViInt16',
+        'numpy': False,
+        'use_in_python_api': True,
+    },
+    {  # 7
+        'ctypes_method_call_snippet': 'ctypes.pointer(output_ctype)',
+        'ctypes_type': 'ViInt64',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViInt64)',
+        'ctypes_variable_name': 'output_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'A big number on its way out.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'output',
+        'is_buffer': True,
+        'use_array': True,
+        'use_list': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'output',
+        'name': 'output',
+        'python_name': 'output',
+        'python_name_with_default': 'output',
+        'python_name_with_doc_default': 'output',
+        'python_type': 'int',
+        'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'},
+        'type': 'ViInt64',
+        'numpy': True,
+        'numpy_type': 'int64',
+        'numpy_type_library_call': 'numpy.int64',
+        'use_in_python_api': True,
+    },
+    {  # 8
+        'ctypes_method_call_snippet': 'number_of_elements_python_code_ctype',
+        'ctypes_type': 'ViInt32',
+        'ctypes_type_library_call': 'ViInt32',
+        'ctypes_variable_name': 'number_of_elements_python_code_ctype',
+        'direction': 'in',
+        'documentation': {'description': 'Number of elements in the array, determined via mechanism python-code.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'number_of_elements_python_code',
+        'is_buffer': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'number_of_elements_python_code',
+        'name': 'numberOfElementsPythonCode',
+        'numpy': False,
+        'python_name': 'number_of_elements_python_code',
+        'python_name_with_default': 'number_of_elements_python_code',
+        'python_name_with_doc_default': 'number_of_elements_python_code',
+        'python_type': 'int',
+        'size': {'mechanism': 'python-code', 'value': 'self.get_array_size_for_python_code()'},
+        'type': 'ViInt32',
+        'use_in_python_api': True,
+    },
+    {  # 9
+        'ctypes_method_call_snippet': 'input_ctype',
+        'ctypes_type': 'ViInt16',
+        'ctypes_type_library_call': 'ViInt16',
+        'ctypes_variable_name': 'input_ctype',
+        'direction': 'in',
+        'documentation': {'description': 'An input value.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'input',
+        'is_buffer': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'input',
+        'name': 'input',
+        'numpy': False,
+        'python_name': 'input',
+        'python_name_with_default': 'input',
+        'python_name_with_doc_default': 'input',
+        'python_type': 'int',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViInt16',
+        'use_in_python_api': True,
+    },
+    {  # 10
+        'ctypes_method_call_snippet': 'input_array_ctype',
+        'ctypes_type': 'ViReal64',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
+        'ctypes_variable_name': 'input_array_ctype',
+        'default_value': None,
+        'direction': 'in',
+        'documentation': {'description': 'Input array of floats'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'input_array',
+        'is_buffer': True,
+        'is_string': False,
+        'use_array': True,
+        'use_list': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'input_array',
+        'name': 'inputArray',
+        'numpy': False,
+        'python_name': 'input_array',
+        'python_name_with_default': 'input_array=None',
+        'python_name_with_doc_default': 'input_array=None',
+        'python_type': 'float',
+        'size': {'mechanism': 'len', 'value': 'inputArraySize'},
+        'type': 'ViReal64',
+        'use_in_python_api': True,
+    },
+    {  # 11
+        'ctypes_method_call_snippet': 'input_array_size_ctype',
+        'ctypes_type': 'ViInt32',
+        'ctypes_type_library_call': 'ViInt32',
+        'ctypes_variable_name': 'input_array_size_ctype',
+        'direction': 'in',
+        'documentation': {'description': 'Size of inputArray'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'input_array_size',
+        'is_buffer': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'input_array_size',
+        'name': 'inputArraySize',
+        'numpy': False,
+        'python_name': 'input_array_size',
+        'python_name_with_default': 'input_array_size',
+        'python_name_with_doc_default': 'input_array_size',
+        'python_type': 'int',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViInt32',
+        'use_in_python_api': True,
+    },
+    {  # 12
+        'ctypes_method_call_snippet': 'string_size_ctype',
+        'ctypes_type': 'ViInt32',
+        'ctypes_type_library_call': 'ViInt32',
+        'ctypes_variable_name': 'string_size_ctype',
+        'direction': 'in',
+        'documentation': {'description': 'Number of bytes allocated for aString'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'string_size',
+        'is_buffer': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'string_size',
+        'name': 'stringSize',
+        'numpy': False,
+        'python_name': 'string_size',
+        'python_name_with_default': 'string_size',
+        'python_name_with_doc_default': 'string_size',
+        'python_type': 'int',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViInt32',
+        'use_in_python_api': True,
+    },
+    {  # 13
+        'ctypes_method_call_snippet': 'a_string_ctype',
+        'ctypes_type': 'ViString',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
+        'ctypes_variable_name': 'a_string_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'An IVI dance string.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'a_string',
+        'is_buffer': False,
+        'is_string': True,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'a_string',
+        'name': 'aString',
+        'numpy': False,
+        'python_name': 'a_string',
+        'python_name_with_default': 'a_string',
+        'python_name_with_doc_default': 'a_string',
+        'python_type': 'str',
+        'size': {'mechanism': 'ivi-dance', 'value': 'stringSize'},
+        'type': 'ViString',
+        'use_in_python_api': True,
+    },
+    {  # 14
+        'ctypes_method_call_snippet': 'timeout_ctype',
+        'ctypes_type': 'ViReal64',
+        'ctypes_type_library_call': 'ViReal64',
+        'ctypes_variable_name': 'timeout_ctype',
+        'default_value': 1.0,
+        'direction': 'in',
+        'documentation': {'description': 'Timeout in seconds'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'timeout',
+        'is_buffer': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'timeout',
+        'name': 'Timeout',
+        'numpy': False,
+        'python_name': 'timeout',
+        'python_name_with_default': 'timeout=1.0',
+        'python_name_with_doc_default': 'timeout=1.0',
+        'python_type': 'float',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViReal64',
+        'use_in_python_api': True,
+        'python_api_converter_name': 'timedelta_converter_seconds_real64',
+    },
+    {  # 15
+        'ctypes_method_call_snippet': 'channel_list_ctype',
+        'ctypes_type': 'ViString',
+        'ctypes_type_library_call': 'ViString',
+        'ctypes_variable_name': 'channel_list_ctype',
+        'direction': 'in',
+        'documentation': {
+            'description': 'The channel to configure. For more information, refer to `Channel String'
+        },
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'channel_list',
+        'is_buffer': False,
+        'is_string': True,
+        'is_repeated_capability': True,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'self._repeated_capability',
+        'name': 'channelList',
+        'numpy': False,
+        'original_type': 'ViChar[]',
+        'python_name': 'channel_list',
+        'python_name_with_default': 'channel_list',
+        'python_name_with_doc_default': 'channel_list',
+        'python_type': 'str',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViString',
+        'use_in_python_api': True,
+    },
+    {  # 16
+        'ctypes_method_call_snippet': 'a_string_ctype',
+        'ctypes_type': 'ViString',
+        'ctypes_type_library_call': 'ViString',
+        'ctypes_variable_name': 'a_string_ctype',
+        'direction': 'in',
+        'documentation': {'description': 'An input string.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'a_string',
+        'is_buffer': False,
+        'is_string': True,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'a_string',
+        'name': 'aString',
+        'numpy': False,
+        'python_name': 'a_string',
+        'python_name_with_default': 'a_string',
+        'python_name_with_doc_default': 'a_string',
+        'python_type': 'int',
+        'size': {'mechanism': 'len', 'value': 'a_string'},
+        'type': 'ViString',
+        'use_in_python_api': True,
+    },
+    {  # 17
+        'ctypes_method_call_snippet': 'array_in_ctype',
+        'ctypes_type': 'custom_struct',
+        'ctypes_type_library_call': 'ctypes.POINTER(custom_struct)',
+        'ctypes_variable_name': 'array_in_ctype',
+        'direction': 'in',
+        'documentation': {'description': 'Array of custom type using python-code size mechanism'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'array_in',
+        'is_buffer': True,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'array_in',
+        'name': 'arrayOut',
+        'original_type': 'custom_struct[]',
+        'python_name': 'array_in',
+        'python_name_with_default': 'array_in',
+        'python_name_with_doc_default': 'array_in',
+        'python_type': 'CustomStruct',
+        'size': {'mechanism': 'len', 'value': 'array_in'},
+        'type': 'custom_struct',
+        'numpy': False,
+        'use_in_python_api': True,
+    },
+    {  # 18
+        'ctypes_method_call_snippet': 'an_int_ctype',
+        'ctypes_type': 'ViInt16',
+        'ctypes_type_library_call': 'ViInt16',
+        'ctypes_variable_name': 'an_int_ctype',
+        'direction': 'out',
+        'documentation': {
+            'description': 'Indicates a ninja turtle',
+        },
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'an_int',
+        'is_buffer': True,
+        'use_array': True,
+        'use_list': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'an_int',
+        'name': 'anInt',
+        'python_name': 'an_int',
+        'python_name_with_default': 'an_int',
+        'python_name_with_doc_default': 'an_int',
+        'python_type': 'int',
+        'size': {'mechanism': 'fixed', 'value': 256},
+        'type': 'ViInt16',
+        'numpy': False,
+        'use_in_python_api': True,
+    },
+    {  # 19
+        'ctypes_method_call_snippet': 'a_string_2_ctype',
+        'ctypes_type': 'ViString',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
+        'ctypes_variable_name': 'a_string_2_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'A fixed size string.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'a_string_2',
+        'is_buffer': False,
+        'is_string': True,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'a_string_2',
+        'name': 'aString2',
+        'numpy': False,
+        'python_name': 'a_string_2',
+        'python_name_with_default': 'a_string_2',
+        'python_name_with_doc_default': 'a_string_2',
+        'python_type': 'str',
+        'size': {'mechanism': 'fixed', 'value': 256},
+        'type': 'ViString',
+        'use_in_python_api': True,
+    },
+    {  # 20
+        'ctypes_method_call_snippet': 'a_string_3_ctype',
+        'ctypes_type': 'ViString',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
+        'ctypes_variable_name': 'a_string_3_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'A python-code size string.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'a_string_3',
+        'is_buffer': False,
+        'is_string': True,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'a_string_3',
+        'name': 'aStrin3g',
+        'numpy': False,
+        'python_name': 'a_string_3',
+        'python_name_with_default': 'a_string_3',
+        'python_name_with_doc_default': 'a_string_3',
+        'python_type': 'str',
+        'size': {'mechanism': 'python-code', 'value': 'string_size'},
+        'type': 'ViString',
+        'use_in_python_api': True,
+    },
+    {  # 21
+        'ctypes_method_call_snippet': 'a_string_twist_ctype',
+        'ctypes_type': 'ViString',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
+        'ctypes_variable_name': 'a_string_twist_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'An IVI dance with a twist string.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'a_string_twist',
+        'is_buffer': False,
+        'is_string': True,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'a_string_twist',
+        'name': 'aStringTwist',
+        'numpy': False,
+        'python_name': 'a_string_twist',
+        'python_name_with_default': 'a_string_twist',
+        'python_name_with_doc_default': 'a_string_twist',
+        'python_type': 'str',
+        'size': {'mechanism': 'ivi-dance-with-a-twist', 'value': 'stringSizeTwist', 'value_twist': 'output_twist', },
+        'type': 'ViString',
+        'use_in_python_api': True,
+    },
+    {  # 22
+        'ctypes_method_call_snippet': 'ctypes.pointer(output_twist_ctype)',
+        'ctypes_type': 'ViInt64',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViInt64)',
+        'ctypes_variable_name': 'output_twist_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'A big number on its way out.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'output_twist',
+        'is_buffer': False,
+        'is_string': False,
+        'use_array': False,
+        'use_list': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'output_twist',
+        'name': 'output_twist',
+        'python_name': 'output_twist',
+        'python_name_with_default': 'output_twist',
+        'python_name_with_doc_default': 'output_twist',
+        'python_type': 'int',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViInt64',
+        'numpy': False,
+        'use_in_python_api': True,
+    },
+    {  # 23
+        'ctypes_method_call_snippet': 'string_size_twist_ctype',
+        'ctypes_type': 'ViInt32',
+        'ctypes_type_library_call': 'ViInt32',
+        'ctypes_variable_name': 'string_size_twist_ctype',
+        'direction': 'in',
+        'documentation': {'description': 'Number of bytes allocated for aStringTwist'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'string_size_twist',
+        'is_buffer': False,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'string_size_twist',
+        'name': 'stringSizeTwist',
+        'numpy': False,
+        'python_name': 'string_size_twist',
+        'python_name_with_default': 'string_size_twist',
+        'python_name_with_doc_default': 'string_size_twist',
+        'python_type': 'int',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViInt32',
+        'use_in_python_api': True,
+    },
+    {  # 24
+        'ctypes_method_call_snippet': 'a_buffer_ctype',
+        'ctypes_type': 'ViInt32',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
+        'ctypes_variable_name': 'a_buffer_array_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'An IVI dance buffer using array.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'a_buffer_array',
+        'is_buffer': True,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'a_buffer',
+        'name': 'aBufferArray',
+        'numpy': False,
+        'python_name': 'a_buffer_array',
+        'python_name_with_default': 'a_buffer_array',
+        'python_name_with_doc_default': 'a_buffer_array',
+        'python_type': 'int',
+        'size': {'mechanism': 'ivi-dance', 'value': 'stringSize'},
+        'type': 'ViInt32',
+        'use_array': True,
+        'use_list': False,
+        'use_in_python_api': True,
+    },
+    {  # 25
+        'ctypes_method_call_snippet': 'a_buffer_ctype',
+        'ctypes_type': 'ViInt32',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
+        'ctypes_variable_name': 'a_buffer_list_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'An IVI dance buffer using a list.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'a_buffer_list',
+        'is_buffer': True,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'a_buffer',
+        'name': 'aBufferList',
+        'numpy': False,
+        'python_name': 'a_buffer_list',
+        'python_name_with_default': 'a_buffer_list',
+        'python_name_with_doc_default': 'a_buffer_list',
+        'python_type': 'int',
+        'size': {'mechanism': 'ivi-dance', 'value': 'stringSize'},
+        'type': 'ViInt32',
+        'use_array': False,
+        'use_list': True,
+        'use_in_python_api': True,
+    },
+    {  # 26
+        'ctypes_method_call_snippet': 'a_buffer_ctype',
+        'ctypes_type': 'ViInt32',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
+        'ctypes_variable_name': 'a_buffer_twist_array_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'An IVI dance with a twist buffer using an array.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'a_buffer_twist_array',
+        'is_buffer': True,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'a_buffer',
+        'name': 'aBufferTwistArray',
+        'numpy': False,
+        'python_name': 'a_buffer_twist_array',
+        'python_name_with_default': 'a_buffer_twist_array',
+        'python_name_with_doc_default': 'a_buffer_twist_array',
+        'python_type': 'int',
+        'size': {'mechanism': 'ivi-dance-with-a-twist', 'value': 'stringSizeTwist', 'value_twist': 'output_twist', },
+        'type': 'ViInt32',
+        'use_array': True,
+        'use_list': False,
+        'use_in_python_api': True,
+    },
+    {  # 27
+        'ctypes_method_call_snippet': 'a_buffer_ctype',
+        'ctypes_type': 'ViInt32',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
+        'ctypes_variable_name': 'a_buffer_twist_list_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'An IVI dance with a twist buffer using a list.'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'a_buffer_twist_list',
+        'is_buffer': True,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'a_buffer',
+        'name': 'aBufferTwistList',
+        'numpy': False,
+        'python_name': 'a_buffer_twist_list',
+        'python_name_with_default': 'a_buffer_twist_list',
+        'python_name_with_doc_default': 'a_buffer_twist_list',
+        'python_type': 'int',
+        'size': {'mechanism': 'ivi-dance-with-a-twist', 'value': 'stringSizeTwist', 'value_twist': 'output_twist', },
+        'type': 'ViInt32',
+        'use_array': False,
+        'use_list': True,
+        'use_in_python_api': True,
+    },
+    {  # 28
+        'ctypes_method_call_snippet': 'input_array_2_ctype',
+        'ctypes_type': 'ViReal64',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
+        'ctypes_variable_name': 'input_array_2_ctype',
+        'default_value': None,
+        'direction': 'in',
+        'documentation': {'description': 'Input array of floats'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'input_array_2',
+        'is_buffer': True,
+        'is_string': False,
+        'use_array': False,
+        'use_list': True,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'input_array_2',
+        'name': 'inputArray2',
+        'numpy': False,
+        'python_name': 'input_array_2',
+        'python_name_with_default': 'input_array_2=None',
+        'python_name_with_doc_default': 'input_array_2=None',
+        'python_type': 'float',
+        'size': {'mechanism': 'len', 'value': 'inputArraySize2'},
+        'type': 'ViReal64',
+        'use_in_python_api': True,
+    },
+    {  # 29
+        'ctypes_method_call_snippet': 'input_array_2_ctype',
+        'ctypes_type': 'ViReal64',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
+        'ctypes_variable_name': 'input_array_2_ctype',
+        'default_value': None,
+        'direction': 'in',
+        'documentation': {'description': 'Input array of floats'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'input_array_2',
+        'is_buffer': True,
+        'is_string': False,
+        'use_array': False,
+        'use_list': True,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'input_array_2',
+        'name': 'inputArray2',
+        'numpy': False,
+        'python_api_converter_name': 'convert_to_nitclk_session_num_list',
+        'python_name': 'input_array_2',
+        'python_name_with_default': 'input_array_2=None',
+        'python_name_with_doc_default': 'input_array_2=None',
+        'python_type': 'float',
+        'size': {'mechanism': 'len', 'value': 'inputArraySize2'},
+        'type': 'ViReal64',
+        'use_in_python_api': True,
+    },
+    {  # 30
+        'ctypes_method_call_snippet': 'input_array_3_ctype',
+        'ctypes_type': 'ViReal64',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
+        'ctypes_variable_name': 'input_array_3_ctype',
+        'default_value': None,
+        'direction': 'in',
+        'documentation': {'description': 'Input array of floats'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'input_array_3',
+        'is_buffer': True,
+        'is_string': False,
+        'use_array': True,
+        'use_list': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'input_array_3',
+        'name': 'inputArray3',
+        'numpy': False,
+        'python_api_converter_name': 'convert_to_nitclk_session_num_list',
+        'python_name': 'input_array_3',
+        'python_name_with_default': 'input_array_3=None',
+        'python_name_with_doc_default': 'input_array_3=None',
+        'python_type': 'float',
+        'size': {'mechanism': 'len', 'value': 'inputArraySize3'},
+        'type': 'ViReal64',
+        'use_in_python_api': True,
+    },
+    {  # 31
+        'ctypes_method_call_snippet': 'input_array_3_ctype',
+        'ctypes_type': 'custom_struct',
+        'ctypes_type_library_call': 'ctypes.POINTER(custom_struct)',
+        'ctypes_variable_name': 'input_array_4_ctype',
+        'default_value': None,
+        'direction': 'in',
+        'documentation': {'description': 'Input array of floats'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'input_array_4',
+        'is_buffer': True,
+        'is_string': False,
+        'use_array': False,
+        'use_list': True,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'input_array_3',
+        'name': 'inputArray4',
+        'numpy': False,
+        'python_api_converter_name': 'convert_to_nitclk_session_num_list',
+        'python_name': 'input_array_4',
+        'python_name_with_default': 'input_array_4=None',
+        'python_name_with_doc_default': 'input_array_4=None',
+        'python_type': 'float',
+        'size': {'mechanism': 'len', 'value': 'inputArraySize4'},
+        'type': 'ViReal64',
+        'use_in_python_api': True,
+    },
+    {  # 32
+        'ctypes_method_call_snippet': 'input_array_3_ctype',
+        'ctypes_type': 'custom_struct',
+        'ctypes_type_library_call': 'ctypes.POINTER(custom_struct)',
+        'ctypes_variable_name': 'input_array_4_ctype',
+        'default_value': None,
+        'direction': 'in',
+        'documentation': {'description': 'Input array of floats'},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'input_array_4',
+        'is_buffer': True,
+        'is_string': False,
+        'use_array': False,
+        'use_list': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'input_array_3',
+        'name': 'inputArray4',
+        'numpy': False,
+        'python_api_converter_name': 'convert_to_nitclk_session_num_list',
+        'python_name': 'input_array_4',
+        'python_name_with_default': 'input_array_4=None',
+        'python_name_with_doc_default': 'input_array_4=None',
+        'python_type': 'float',
+        'size': {'mechanism': 'len', 'value': 'inputArraySize4'},
+        'type': 'ViReal64',
+        'use_in_python_api': True,
+    },
+    {  # 33
+        'ctypes_method_call_snippet': 'a_string_enum_ctype',
+        'ctypes_type': 'ViString',
+        'ctypes_type_library_call': 'ViString',
+        'ctypes_variable_name': 'a_string_enum_ctype',
+        'direction': 'in',
+        'documentation': {'description': 'An input string-valued enum.'},
+        'enum': 'Color',
+        'grpc_enum': 'Color',
+        'grpc_name': 'a_string_enum_raw',
+        'is_buffer': False,
+        'is_string': True,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'a_string_enum',
+        'name': 'aStringEnum',
+        'numpy': False,
+        'python_name': 'a_string_enum',
+        'python_name_with_default': 'a_string_enum',
+        'python_name_with_doc_default': 'a_string_enum',
+        'python_type': 'enums.Color',
+        'size': {'mechanism': 'len', 'value': 'a_string_enum'},
+        'type': 'ViString',
+        'use_in_python_api': True,
+    },
+    {  # 34
+        'ctypes_method_call_snippet': 'indices_ctype',
+        'ctypes_type': 'ViConstString',
+        'ctypes_type_library_call': 'ViConstString',
+        'ctypes_variable_name': 'indices_ctype',
+        'direction': 'in',
+        'documentation': {
+            'description': 'Specifies a list of indices for the channels in the session.'
+        },
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'indices',
+        'is_buffer': False,
+        'is_string': True,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'indices',
+        'name': 'indices',
+        'numpy': False,
+        'original_type': 'ViChar[]',
+        'python_api_converter_name': 'convert_repeated_capabilities_without_prefix',
+        'python_name': 'indices',
+        'python_name_with_default': 'indices',
+        'python_name_with_doc_default': 'indices',
+        'python_type': 'str',
+        'size': {'mechanism': 'fixed', 'value': 1},
+        'type': 'ViConstString',
+        'use_in_python_api': True,
+    },
+    {  # 35
+        'ctypes_method_call_snippet': 'an_array_ctype',
+        'ctypes_type': 'ViInt8',
+        'ctypes_type_library_call': 'ctypes.POINTER(ViInt8)',
+        'ctypes_variable_name': 'an_array_ctype',
+        'direction': 'out',
+        'documentation': {'description': 'Contains an array of enums, stored as 8 bit integers under the hood '},
+        'enum': None,
+        'grpc_enum': None,
+        'grpc_name': 'a_grpc_array',
+        'is_buffer': True,
+        'use_array': False,
+        'use_list': True,
+        'is_string': False,
+        'is_repeated_capability': False,
+        'is_session_handle': False,
+        'interpreter_method_call_snippet': 'an_array',
+        'name': 'anArray',
+        'python_api_converter_name': 'convert_to_bytes',
+        'python_name': 'an_array',
+        'python_name_with_default': 'an_array',
+        'python_name_with_doc_default': 'an_array',
+        'python_type': 'int',
+        'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'},
+        'type': 'ViInt8',
+        'numpy': False,
+        'use_in_python_api': True,
+    },
+]
+
+
+def test_get_library_interpreter_method_return_snippet_vi():
+    param = [parameters_for_testing[0]]
+    assert get_library_interpreter_method_return_snippet(param, config_for_testing) == 'return'
+
+
+def test_get_library_interpreter_method_return_snippet_int():
+    param = [parameters_for_testing[1]]
+    assert get_library_interpreter_method_return_snippet(param, config_for_testing) == 'return int(output_ctype.value)'
+
+
+def test_get_library_interpreter_method_return_snippet_string():
+    param = [parameters_for_testing[2]]
+    assert get_library_interpreter_method_return_snippet(param, config_for_testing) == 'return error_message_ctype.value.decode(self._encoding)'
+
+
+def test_get_library_interpreter_method_return_snippet_custom_type():
+    param = [parameters_for_testing[3]]
+    assert get_library_interpreter_method_return_snippet(param, config_for_testing) == 'return [custom_struct.CustomStruct(array_out_ctype[i]) for i in range(self.get_array_size_for_python_code())]'
+
+
+def test_get_library_interpreter_method_return_snippet_enum():
+    param = [parameters_for_testing[4], parameters_for_testing[5]]
+    assert get_library_interpreter_method_return_snippet(param, config_for_testing) == 'return [enums.Turtle(an_array_ctype[i]) for i in range(number_of_elements_ctype.value)]'
+
+
+def test_get_library_interpreter_method_return_snippet_into():
+    param = [parameters_for_testing[4], parameters_for_testing[7]]
+    assert get_library_interpreter_method_return_snippet(param, config_for_testing, use_numpy_array=True) == 'return'
+
+
+def test_get_grpc_interpreter_method_return_snippet_vi():
+    param = [parameters_for_testing[0]]
+    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return'
+
+
+def test_get_grpc_interpreter_method_return_snippet_int():
+    param = [parameters_for_testing[1]]
+    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return response.output'
+
+
+def test_get_grpc_interpreter_method_return_snippet_string():
+    param = [parameters_for_testing[2]]
+    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return response.error_message'
+
+
+def test_get_grpc_interpreter_method_return_snippet_custom_type():
+    param = [parameters_for_testing[3]]
+    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return [custom_struct.CustomStruct(x) for x in response.array_out]'
+
+
+def test_get_grpc_interpreter_method_return_snippet_enum():
+    param = [parameters_for_testing[4], parameters_for_testing[5]]
+    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return [enums.Turtle(x) for x in response.an_array_raw]'
+
+
+def test_get_grpc_interpreter_method_return_snippet_bytes():
+    param = [parameters_for_testing[35]]
+    assert get_grpc_interpreter_method_return_snippet(param, config_for_testing) == 'return response.a_grpc_array'
+
+
+def test_get_session_method_return_snippet():
+    param = [dict(parameters_for_testing[14])]
+    param[0]['direction'] = 'out'
+    assert get_session_method_return_snippet(param, config_for_testing) == 'return _converters.timedelta_converter_seconds_real64(timeout)'
+
+
+def test_get_session_method_return_snippet_non_numpy():
+    param = [parameters_for_testing[4], parameters_for_testing[7]]
+    assert get_session_method_return_snippet(param, config_for_testing) == 'return output'
+
+
+def test_get_session_method_return_snippet_numpy():
+    param = [parameters_for_testing[4], parameters_for_testing[7]]
+    assert get_session_method_return_snippet(param, config_for_testing, use_numpy_array=True) == 'return'
+
+
+def test_get_enum_type_check_snippet():
+    param = parameters_for_testing[6]
+    assert get_enum_type_check_snippet(param, 0) == "if type(an_int_enum) is not enums.Turtle:\nraise TypeError('Parameter an_int_enum must be of type ' + str(enums.Turtle))"
+
+
+def test_get_buffer_parameters_for_size_parameter_none():
+    params = _get_buffer_parameters_for_size_parameter(parameters_for_testing[0], parameters_for_testing)
+    assert len(params) == 0
+
+
+def test_get_buffer_parameters_for_size_parameter():
+    params = _get_buffer_parameters_for_size_parameter(parameters_for_testing[4], parameters_for_testing)
+    assert params[0] == parameters_for_testing[5]
+
+
+def test_get_ctype_variable_declaration_snippet_case_c010():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[15], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["channel_list_ctype = ctypes.create_string_buffer(channel_list.encode(self._encoding))  # case C010"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_c020():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[16], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_string_ctype = ctypes.create_string_buffer(a_string.encode(self._encoding))  # case C020"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_c030():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[33], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_string_enum_ctype = ctypes.create_string_buffer(a_string_enum.value.encode(self._encoding))  # case C030"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_c050():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[13], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_string_ctype = None  # case C050"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_c060():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[13], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_string_ctype = (_visatype.ViChar * string_size_ctype.value)()  # case C060"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_c070():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[19], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_string_2_ctype = (_visatype.ViChar * 256)()  # case C070"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_c080():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[20], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_string_3_ctype = (_visatype.ViChar * string_size)()  # case C080"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_c090():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[21], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_string_twist_ctype = None  # case C090"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_c100():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[21], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_string_twist_ctype = (_visatype.ViChar * output_twist_ctype.value)()  # case C100"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_s110():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[0], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["vi_ctype = _visatype.ViSession(self._vi)  # case S110"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_s120():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[8], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["number_of_elements_python_code_ctype = _visatype.ViInt32(self.get_array_size_for_python_code())  # case S120"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_s130():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[6], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["an_int_enum_ctype = _visatype.ViInt16(an_int_enum.value)  # case S130"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_s150():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[9], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["input_ctype = _visatype.ViInt16(input)  # case S150"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_s160():
+    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[11], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert actual == ["input_array_size_ctype = _visatype.ViInt32(0 if input_array is None else len(input_array))  # case S160"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_s170():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[12], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["string_size_ctype = _visatype.ViInt32()  # case S170"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_s180():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[12], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
+    assert snippet == ["string_size_ctype = _visatype.ViInt32(error_code)  # case S180"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_s2190():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[23], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["string_size_twist_ctype = _visatype.ViInt32(0)  # case S190"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_s200():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[23], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
+    assert snippet == ["string_size_twist_ctype = _visatype.ViInt32(output_twist_ctype.value)  # case S200"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_s210():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[4], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["number_of_elements_ctype = _visatype.ViInt32(number_of_elements)  # case S210"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_s220():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[1], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["output_ctype = _visatype.ViInt64()  # case S220"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b510():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[7], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=True)
+    assert snippet == ["output_ctype = _get_ctypes_pointer_for_buffer(value=output)  # case B510"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b540():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[17], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["array_in_ctype = _get_ctypes_pointer_for_buffer([custom_struct.custom_struct(c) for c in array_in], library_type=custom_struct.custom_struct)  # case B540"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b550_array():
+    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[10], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    expected = [
+        'input_array_array = _convert_to_array(value=input_array, array_type="d")  # case B550',
+        'input_array_ctype = _get_ctypes_pointer_for_buffer(value=input_array_array, library_type=_visatype.ViReal64)  # case B550',
+    ]
+    assert len(actual) == len(expected)
+    for i in range(max(len(actual), len(expected))):
+        assert actual[i] == expected[i]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b550_list():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[28], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["input_array_2_ctype = _get_ctypes_pointer_for_buffer(value=input_array_2, library_type=_visatype.ViReal64)  # case B550"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b560():
+    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[3], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    expected = [
+        'array_out_size = self.get_array_size_for_python_code()  # case B560',
+        'array_out_ctype = _get_ctypes_pointer_for_buffer(library_type=custom_struct.custom_struct, size=array_out_size)  # case B560',
+    ]
+    assert len(actual) == len(expected)
+    for i in range(max(len(actual), len(expected))):
+        assert actual[i] == expected[i]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b570():
+    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[18], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    expected = [
+        'an_int_size = 256  # case B570',
+        'an_int_array = array.array("h", [0] * an_int_size)  # case B570',
+        'an_int_ctype = _get_ctypes_pointer_for_buffer(value=an_int_array, library_type=_visatype.ViInt16)  # case B570',
+    ]
+    assert len(actual) == len(expected)
+    for i in range(max(len(actual), len(expected))):
+        assert actual[i] == expected[i]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b580_array():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[24], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_buffer_array_ctype = None  # case B580"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b590_array():
+    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[24], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
+    expected = [
+        'a_buffer_array_size = string_size_ctype.value  # case B590',
+        'a_buffer_array_array = array.array("l", [0] * a_buffer_array_size)  # case B590',
+        'a_buffer_array_ctype = _get_ctypes_pointer_for_buffer(value=a_buffer_array_array, library_type=_visatype.ViInt32)  # case B590',
+    ]
+    assert len(actual) == len(expected)
+    for i in range(max(len(actual), len(expected))):
+        assert actual[i] == expected[i]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b580_list():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[25], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_buffer_list_ctype = None  # case B580"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b590_list():
+    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[25], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
+    expected = [
+        'a_buffer_list_size = string_size_ctype.value  # case B590',
+        'a_buffer_list_ctype = _get_ctypes_pointer_for_buffer(library_type=_visatype.ViInt32, size=a_buffer_list_size)  # case B590',
+    ]
+    assert len(actual) == len(expected)
+    for i in range(max(len(actual), len(expected))):
+        assert actual[i] == expected[i]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b600():
+    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[7], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+    expected = [
+        'output_size = number_of_elements  # case B600',
+        'output_array = array.array("q", [0] * output_size)  # case B600',
+        'output_ctype = _get_ctypes_pointer_for_buffer(value=output_array, library_type=_visatype.ViInt64)  # case B600',
+    ]
+    assert len(actual) == len(expected)
+    for i in range(max(len(actual), len(expected))):
+        assert actual[i] == expected[i]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b610_array():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[26], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_buffer_twist_array_ctype = None  # case B610"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b620_array():
+    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[26], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
+    expected = [
+        'a_buffer_twist_array_size = output_twist_ctype.value  # case B620',
+        'a_buffer_twist_array_array = array.array("l", [0] * a_buffer_twist_array_size)  # case B620',
+        'a_buffer_twist_array_ctype = _get_ctypes_pointer_for_buffer(value=a_buffer_twist_array_array, library_type=_visatype.ViInt32)  # case B620',
+    ]
+    assert len(actual) == len(expected)
+    for i in range(max(len(actual), len(expected))):
+        assert actual[i] == expected[i]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b610_list():
+    snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[27], parameters_for_testing, IviDanceStep.QUERY_SIZE, config_for_testing, use_numpy_array=False)
+    assert snippet == ["a_buffer_twist_list_ctype = None  # case B610"]
+
+
+def test_get_ctype_variable_declaration_snippet_case_b620_list():
+    actual = get_ctype_variable_declaration_snippet(parameters_for_testing[27], parameters_for_testing, IviDanceStep.GET_DATA, config_for_testing, use_numpy_array=False)
+    expected = [
+        'a_buffer_twist_list_size = output_twist_ctype.value  # case B620',
+        'a_buffer_twist_list_ctype = _get_ctypes_pointer_for_buffer(library_type=_visatype.ViInt32, size=a_buffer_twist_list_size)  # case B620',
+    ]
+    assert len(actual) == len(expected)
+    for i in range(max(len(actual), len(expected))):
+        assert actual[i] == expected[i]
+
+
+def test_get_ctype_variable_declaration_snippet_bad_ivi_dance_step():
+    try:
+        get_ctype_variable_declaration_snippet(parameters_for_testing[12], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=False)
+        assert False
+    except AssertionError:
+        pass
+
+
+# TODO(marcoskirsch): unit tests for reamining cases of get_ctype_variable_declaration_snippet(): parameter is a buffer.
+
+
+def test_get_enum_value_snippet():
+    assert get_enum_value_snippet(None) == 'None'
+    assert get_enum_value_snippet(True) == 'True'
+    assert get_enum_value_snippet(0) == '0'
+    assert get_enum_value_snippet('True') == "'True'"
+    assert get_enum_value_snippet('0') == "'0'"
diff --git a/build/unit_tests/test_documentation_helper.py b/build/unit_tests/test_documentation_helper.py
new file mode 100644
index 000000000..f87abb97e
--- /dev/null
+++ b/build/unit_tests/test_documentation_helper.py
@@ -0,0 +1,729 @@
+from build.helper.documentation_helper import *
+
+
+def _remove_trailing_whitespace(s):
+    '''Removes trailing whitespace and empty lines in multi-line strings.'''
+    initial_lines = s.strip().splitlines()
+    fixed_lines = []
+    blank_lines = 0
+    for line in initial_lines:
+        stripped_line = line.strip()
+        if len(stripped_line) == 0 and blank_lines == 0:
+            fixed_lines.append(stripped_line)
+            blank_lines = 1
+        if len(stripped_line) > 0:
+            fixed_lines.append(stripped_line)
+            blank_lines = 0
+
+    return fixed_lines
+
+
+def assert_rst_strings_are_equal(expected, actual):
+    '''Asserts rst formatted strings (multiline) are equal. Ignores trailing whitespace and empty lines.'''
+    expected = _remove_trailing_whitespace(expected)
+    actual = _remove_trailing_whitespace(actual)
+    for expected_line, actual_line in zip(expected, actual):
+        assert expected_line == actual_line, 'Difference found:\n{0}\n{1}'.format(expected_line, actual_line)
+
+
+config = {
+    'functions': {
+        'GetTurtleID': {
+            'codegen_method': 'public',
+            'returns': 'ViStatus',
+            'method_templates': [{'filename': '/default_method', 'method_python_name_suffix': '', }, ],
+            'parameters': [
+                {
+                    'direction': 'in',
+                    'enum': None,
+                    'name': 'vi',
+                    'type': 'ViSession',
+                    'documentation': {
+                        'description': 'Identifies a particular instrument session.'
+                    },
+                    'python_name': 'vi',
+                    'python_type': 'int',
+                    'type_in_documentation': 'int',
+                    'type_in_documentation_was_calculated': True,
+                    'ctypes_variable_name': 'vi_ctype',
+                    'ctypes_type': 'ViSession',
+                    'ctypes_type_library_call': 'ViSession',
+                    'size': {
+                        'mechanism': 'fixed',
+                        'value': 1
+                    },
+                    'is_buffer': False,
+                    'is_string': False,
+                    'use_list': False,
+                    'use_array': False,
+                    'python_name_with_default': 'vi',
+                    'python_name_with_doc_default': 'vi',
+                    'is_repeated_capability': False,
+                    'is_session_handle': True,
+                    'interpreter_method_call_snippet': 'self._vi',
+                    'use_in_python_api': True,
+                },
+                {
+                    'direction': 'in',
+                    'enum': 'Turtle',
+                    'name': 'turtleType',
+                    'type': 'ViInt32',
+                    'documentation': {
+                        'description': '''Specifies the type of Turtle type
+wanted to choose.''',
+                        'note': 'You wont be able to import NIFAKE_VAL_RAPHAEL',
+                        'table_body': [
+                            ['NIFAKE_VAL_LEONARDO (default)', '0', 'LEONARDO'],
+                            ['NIFAKE_VAL_DONATELLO', '1', 'DONATELLO'],
+                            ['NIFAKE_VAL_RAPHAEL', '2', 'RAPHAEL'],
+                            ['NIFAKE_VAL_MICHELANGELO', '3', 'MICHELANGELO']
+                        ]
+                    },
+                    'python_name': 'turtle_type',
+                    'python_type': 'Turtle',
+                    'type_in_documentation': 'Turtle',
+                    'type_in_documentation_was_calculated': True,
+                    'ctypes_variable_name': 'turtle_type_ctype',
+                    'ctypes_type': 'ViInt32',
+                    'ctypes_type_library_call': 'ViInt32',
+                    'size': {
+                        'mechanism': 'fixed',
+                        'value': 1
+                    },
+                    'is_buffer': False,
+                    'is_string': False,
+                    'use_list': False,
+                    'use_array': False,
+                    'python_name_with_default': 'turtle_type',
+                    'python_name_with_doc_default': 'turtle_type',
+                    'is_repeated_capability': False,
+                    'is_session_handle': False,
+                    'interpreter_method_call_snippet': 'turtle_type',
+                    'use_in_python_api': True,
+                },
+                {
+                    'direction': 'out',
+                    'enum': None,
+                    'name': 'turtleId',
+                    'type': 'ViReal64',
+                    'documentation': {
+                        'description': 'Returns the **ID** of selected turtle.'
+                    },
+                    'python_name': 'turtle_id',
+                    'python_type': 'float',
+                    'type_in_documentation': 'float',
+                    'type_in_documentation_was_calculated': True,
+                    'ctypes_variable_name': 'turtleId_ctype',
+                    'ctypes_type': 'ViReal64',
+                    'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
+                    'size': {
+                        'mechanism': 'fixed',
+                        'value': 1
+                    },
+                    'is_buffer': False,
+                    'is_string': False,
+                    'use_list': False,
+                    'use_array': False,
+                    'python_name_with_default': 'turtleId',
+                    'python_name_with_doc_default': 'turtleId',
+                    'is_repeated_capability': False,
+                    'is_session_handle': False,
+                    'interpreter_method_call_snippet': 'ctypes.pointer(turtleId_ctype)',
+                    'use_in_python_api': True,
+                }
+            ],
+            'documentation': {
+                'description': 'Returns the **ID** of selected Turtle Type. See `NIFAKE help <REPLACE_DRIVER_SPECIFIC_URL_1(fake_functional_overview)>`__',
+                'note': [
+                    'The NIFAKE_VAL_RAPHAEL Turtles dont have an ID.',
+                    'DO NOT call niFake_FetchWaveform after calling this function.',
+                    'NIFAKE_ATTR_READ_WRITE_BOOL will have an incorrect value after this calling this function',
+                ]
+            },
+            'name': 'GetTurtleID',
+            'python_name': 'get_turtle_id',
+            'interpreter_name': 'get_turtle_id',
+            'is_error_handling': False,
+            'has_repeated_capability': False
+        },
+        'FetchWaveform': {
+            'codegen_method': 'public',
+            'documentation': {'description': 'Returns waveform data.'},
+            'has_repeated_capability': False,
+            'is_error_handling': False,
+            'method_templates': [{'filename': '/default_method', 'method_python_name_suffix': ''}, {'filename': '/numpy_method', 'method_python_name_suffix': '_into'}],
+            'name': 'FetchWaveform',
+            'parameters': [
+                {
+                    'ctypes_type': 'ViSession',
+                    'ctypes_type_library_call': 'ViSession',
+                    'ctypes_variable_name': 'vi_ctype',
+                    'direction': 'in',
+                    'documentation': {'description': 'Identifies a particular instrument session.'},
+                    'enum': None,
+                    'is_buffer': False,
+                    'is_string': False,
+                    'use_list': False,
+                    'use_array': False,
+                    'is_repeated_capability': False,
+                    'is_session_handle': True,
+                    'interpreter_method_call_snippet': 'vi_ctype',
+                    'name': 'vi',
+                    'numpy': False,
+                    'python_name': 'vi',
+                    'python_name_with_default': 'vi',
+                    'python_name_with_doc_default': 'vi',
+                    'python_type': 'int',
+                    'type_in_documentation': 'int',
+                    'type_in_documentation_was_calculated': True,
+                    'size': {'mechanism': 'fixed', 'value': 1},
+                    'type': 'ViSession',
+                    'use_in_python_api': True,
+                },
+                {
+                    'ctypes_type': 'ViInt32',
+                    'ctypes_type_library_call': 'ViInt32',
+                    'ctypes_variable_name': 'number_of_samples_ctype',
+                    'direction': 'in',
+                    'documentation': {'description': 'Number of samples to return'},
+                    'enum': None,
+                    'is_buffer': False,
+                    'is_string': False,
+                    'use_list': False,
+                    'use_array': False,
+                    'is_repeated_capability': False,
+                    'is_session_handle': False,
+                    'interpreter_method_call_snippet': 'number_of_samples_ctype',
+                    'name': 'numberOfSamples',
+                    'numpy': False,
+                    'python_name': 'number_of_samples',
+                    'python_name_with_default': 'number_of_samples',
+                    'python_name_with_doc_default': 'number_of_samples',
+                    'python_type': 'int',
+                    'type_in_documentation': 'int',
+                    'type_in_documentation_was_calculated': True,
+                    'size': {'mechanism': 'fixed', 'value': 1},
+                    'type': 'ViInt32',
+                    'use_in_python_api': True,
+                },
+                {
+                    'ctypes_type': 'ViReal64',
+                    'ctypes_type_library_call': 'ctypes.POINTER(ViReal64)',
+                    'ctypes_variable_name': 'waveform_data_ctype',
+                    'direction': 'out',
+                    'documentation': {'description': 'Samples fetched from the device. Array should be numberOfSamples big.'},
+                    'enum': None,
+                    'is_buffer': True,
+                    'is_string': False,
+                    'use_list': False,
+                    'use_array': True,
+                    'is_repeated_capability': False,
+                    'is_session_handle': False,
+                    'interpreter_method_call_snippet': 'waveform_data_ctype',
+                    'name': 'waveformData',
+                    'numpy': True,
+                    'numpy_type': 'float64',
+                    'original_type': 'ViReal64[]',
+                    'python_name': 'waveform_data',
+                    'python_name_with_default': 'waveform_data',
+                    'python_name_with_doc_default': 'waveform_data',
+                    'python_type': 'float',
+                    'type_in_documentation': 'float',
+                    'type_in_documentation_was_calculated': True,
+                    'size': {'mechanism': 'passed-in', 'value': 'numberOfSamples'},
+                    'type': 'ViReal64',
+                    'use_in_python_api': True,
+                },
+                {
+                    'ctypes_type': 'ViInt32',
+                    'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
+                    'ctypes_variable_name': 'actual_number_of_samples_ctype',
+                    'direction': 'out',
+                    'documentation': {'description': 'Number of samples actually fetched.'},
+                    'enum': None,
+                    'is_buffer': False,
+                    'is_string': False,
+                    'use_list': False,
+                    'use_array': False,
+                    'is_repeated_capability': False,
+                    'is_session_handle': False,
+                    'interpreter_method_call_snippet': 'ctypes.pointer(actual_number_of_samples_ctype)',
+                    'name': 'actualNumberOfSamples',
+                    'numpy': False,
+                    'python_name': 'actual_number_of_samples',
+                    'python_name_with_default': 'actual_number_of_samples',
+                    'python_name_with_doc_default': 'actual_number_of_samples',
+                    'python_type': 'int',
+                    'type_in_documentation': 'int',
+                    'type_in_documentation_was_calculated': True,
+                    'size': {'mechanism': 'fixed', 'value': 1},
+                    'type': 'ViInt32',
+                    'use_in_python_api': True,
+                }
+            ],
+            'python_name': 'fetch_waveform',
+            'interpreter_name': 'fetch_waveform',
+            'render_in_session_base': False,
+            'returns': 'ViStatus'
+        },
+    },
+    'metadata_version': '1.0',
+    'module_name': 'nifake',
+    'module_version': '0.3.0.dev0',
+    'c_function_prefix': 'niFake_',
+    'driver_name': 'NI-FAKE',
+    'session_class_description': 'An NI-FAKE session to a fake MI driver whose sole purpose is to test nimi-python code generation',
+    'session_handle_parameter_name': 'vi',
+    'driver_urls': {
+        'REPLACE_DRIVER_SPECIFIC_URL_1': 'http://zone.ni.com/reference/en-XX/help/370384T-01/fake/{0}/',
+    },
+    'library_info':
+    {
+        'Windows': {
+            '32bit': {'name': 'nifake_32.dll', 'type': 'windll'},
+            '64bit': {'name': 'nifake_64.dll', 'type': 'cdll'},
+        },
+        'Linux': {
+            '64bit': {'name': 'libnifake.so', 'type': 'cdll'},
+        },
+    },
+    'context_manager_name': {
+        'task': 'acquisition',
+        'initiate_function': 'Initiate',
+        'abort_function': 'Abort',
+    },
+    'init_function': 'InitWithOptions',
+    'attributes': {
+        1000000: {
+            'access': 'read-write',
+            'enum': None,
+            'lv_property': 'Fake attributes:Read Write Bool',
+            'name': 'READ_WRITE_BOOL',
+            'type': 'ViBoolean',
+            'documentation': {
+                'description': 'An attribute of type bool with read/write access.',
+            },
+        },
+    },
+    'enums': {
+        'Turtle': {
+            'codegen_method': 'public',
+            'python_name': 'Turtle',
+            'values': [
+                {
+                    'name': 'NIFAKE_VAL_LEONARDO',
+                    'python_name': 'LEONARDO',
+                    'value': 0,
+                    'documentation': {
+                        'description': 'Wields two katanas.',
+                    }
+                },
+                {
+                    'name': 'NIFAKE_VAL_DONATELLO',
+                    'python_name': 'DONATELLO',
+                    'value': 1,
+                    'documentation': {
+                        'description': 'Uses a bo staff.',
+                    }
+                },
+                {
+                    'name': 'NIFAKE_VAL_RAPHAEL',
+                    'python_name': 'RAPHAEL',
+                    'value': 2,
+                    'documentation': {
+                        'description': 'Has a pair of sai.',
+                    }
+                },
+                {
+                    'name': 'NIFAKE_VAL_MICHELANGELO',
+                    'python_name': 'MICHELANGELO',
+                    'value': 3,
+                    'documentation': {
+                        'description': 'Owns nunchucks.',
+                    }
+                },
+            ],
+        },
+    },
+}
+
+
+def test_get_function_rst_default():
+    function = config['functions']['GetTurtleID']
+    method_template = function['method_templates'][0]
+    actual_function_rst = get_function_rst(function, method_template=method_template, numpy=False, config=config, indent=0)
+    expected_fuction_rst = '''.. py:method:: get_turtle_id(turtle_type)
+
+    Returns the **ID** of selected Turtle Type. See `NIFAKE help <http://zone.ni.com/reference/en-XX/help/370384T-01/fake/fake_functional_overview/>`__
+
+    .. note:: The :py:data:`~nifake.Turtle.RAPHAEL` Turtles dont have an ID.
+
+    .. note:: DO NOT call :py:meth:`nifake.Session.fetch_waveform` after calling this method.
+
+    .. note:: :py:attr:`nifake.Session.read_write_bool` will have an incorrect value after this calling this method
+
+    :param turtle_type:
+
+    Specifies the type of Turtle type
+    wanted to choose.
+
+    +----------------------------------------------+---+--------------+
+    | :py:data:`~nifake.Turtle.LEONARDO` (default) | 0 | LEONARDO     |
+    +----------------------------------------------+---+--------------+
+    | :py:data:`~nifake.Turtle.DONATELLO`          | 1 | DONATELLO    |
+    +----------------------------------------------+---+--------------+
+    | :py:data:`~nifake.Turtle.RAPHAEL`            | 2 | RAPHAEL      |
+    +----------------------------------------------+---+--------------+
+    | :py:data:`~nifake.Turtle.MICHELANGELO`       | 3 | MICHELANGELO |
+    +----------------------------------------------+---+--------------+
+
+    .. note:: You wont be able to import :py:data:`~nifake.Turtle.RAPHAEL`
+
+    :type turtle_type: :py:data:`nifake.Turtle`
+
+    :rtype: float
+    :return:
+
+        Returns the **ID** of selected turtle.
+'''
+    assert_rst_strings_are_equal(expected_fuction_rst, actual_function_rst)
+
+
+def test_get_function_rst_numpy():
+    function = config['functions']['FetchWaveform']
+    method_template = function['method_templates'][0]
+    actual_function_rst = get_function_rst(function, method_template=method_template, numpy=True, config=config, indent=0)
+    expected_fuction_rst = '''.. py:method:: fetch_waveform(number_of_samples)
+
+    Returns waveform data.
+
+    :param number_of_samples:
+
+        Number of samples to return
+
+    :type number_of_samples: int
+    :param waveform_data:
+
+        Samples fetched from the device. Array should be numberOfSamples big.
+
+    :type waveform_data: numpy.array(dtype=numpy.float64)
+
+    :rtype: int
+    :return:
+
+        Number of samples actually fetched.
+'''
+    assert_rst_strings_are_equal(expected_fuction_rst, actual_function_rst)
+
+
+def test_get_attribute_repeated_caps():
+    attr = {'supported_rep_caps': ['channels', 'instruments', 'pins']}
+    expected_caps = 'channels, instruments, pins'
+    actual_caps = get_attribute_repeated_caps(attr)
+    assert actual_caps == expected_caps
+
+    attr = {'supported_rep_caps': ['channels']}
+    expected_caps = 'channels'
+    actual_caps = get_attribute_repeated_caps(attr)
+    assert actual_caps == expected_caps
+
+    attr = {'supported_rep_caps': []}
+    expected_caps = 'None'
+    actual_caps = get_attribute_repeated_caps(attr)
+    assert actual_caps == expected_caps
+
+    attr = {}
+    expected_caps = 'None'
+    actual_caps = get_attribute_repeated_caps(attr)
+    assert actual_caps == expected_caps
+
+
+def test_get_attribute_repeated_caps_with_conjunction():
+    attr = {'supported_rep_caps': ['channels', 'instruments', 'pins']}
+    expected_caps = 'channels, instruments or pins'
+    actual_caps = get_attribute_repeated_caps_with_conjunction(attr)
+    assert actual_caps == expected_caps
+
+    attr = {'supported_rep_caps': ['channels', 'instruments']}
+    expected_caps = 'channels or instruments'
+    actual_caps = get_attribute_repeated_caps_with_conjunction(attr)
+    assert actual_caps == expected_caps
+
+    attr = {'supported_rep_caps': ['channels']}
+    expected_caps = 'channels'
+    actual_caps = get_attribute_repeated_caps_with_conjunction(attr)
+    assert actual_caps == expected_caps
+
+    attr = {'supported_rep_caps': []}
+    expected_caps = 'None'
+    actual_caps = get_attribute_repeated_caps_with_conjunction(attr)
+    assert actual_caps == expected_caps
+
+
+def test_module_supports_repeated_caps():
+    config = {'repeated_capabilities': [{'python_name': 'channels'}]}
+    expected_value = True
+    actual_value = module_supports_repeated_caps(config)
+    assert actual_value == expected_value
+
+    config = {'repeated_capabilities': []}
+    expected_value = False
+    actual_value = module_supports_repeated_caps(config)
+    assert actual_value == expected_value
+
+    config = {}
+    expected_value = False
+    actual_value = module_supports_repeated_caps(config)
+    assert actual_value == expected_value
+
+
+def test_get_function_docstring_default():
+    function = config['functions']['GetTurtleID']
+    actual_function_docstring = get_function_docstring(function, numpy=False, config=config, indent=0)
+    expected_function_docstring = '''Returns the **ID** of selected Turtle Type. See `NIFAKE help <fake_functional_overview>`__
+
+Note: The Turtle.RAPHAEL Turtles dont have an ID.
+
+Note: DO NOT call fetch_waveform after calling this method.
+
+Note: read_write_bool will have an incorrect value after this calling this method
+
+Args:
+    turtle_type (Turtle): Specifies the type of Turtle type
+        wanted to choose.
+
+        +---------------------------+---+--------------+
+        | Turtle.LEONARDO (default) | 0 | LEONARDO     |
+        +---------------------------+---+--------------+
+        | Turtle.DONATELLO          | 1 | DONATELLO    |
+        +---------------------------+---+--------------+
+        | Turtle.RAPHAEL            | 2 | RAPHAEL      |
+        +---------------------------+---+--------------+
+        | Turtle.MICHELANGELO       | 3 | MICHELANGELO |
+        +---------------------------+---+--------------+
+
+        Note: You wont be able to import Turtle.RAPHAEL
+
+Returns:
+    turtle_id (float): Returns the **ID** of selected turtle.''' # noqa
+    assert_rst_strings_are_equal(expected_function_docstring, actual_function_docstring)
+
+
+def test_get_function_docstring_numpy():
+    function = config['functions']['FetchWaveform']
+    actual_function_docstring = get_function_docstring(function, numpy=True, config=config, indent=0)
+    expected_fuction_docstring = '''Returns waveform data.
+
+    Args:
+        number_of_samples (int): Number of samples to return
+
+        waveform_data (numpy.array(dtype=numpy.float64)): Samples fetched from the device. Array should be numberOfSamples big.
+
+    Returns:
+        actual_number_of_samples (int): Number of samples actually fetched.
+'''
+    assert_rst_strings_are_equal(expected_fuction_docstring, actual_function_docstring)
+
+
+def test_get_rst_header_snippet():
+    header = "This will be your method header"
+    actual_rst_header = get_rst_header_snippet(header)
+    expected_rst_header = """This will be your method header
+==============================="""
+    assert actual_rst_header == expected_rst_header
+
+
+def test_get_documentation_for_node_docstring():
+    caution = """ this is a very
+long string if I had the
+energy to type more and more ..."""
+    description = """ This string might be
+at maximum size I can handle"""
+    node = {
+        'documentation': {
+            'caution': caution,
+            'description': description,
+            'table_header': ['what', 'how', 'who'],
+            'table_body': [
+                ['lorem', 'that is a dummy string', 'Place holder string'],
+                ['ipsum', 'this is a random strinf', 'Yes, I am a random string']
+            ]
+        }
+    }
+    actual_documentation = get_documentation_for_node_docstring(node, config, indent=4)
+    expected_documentation = """Caution:  this is a very
+    long string if I had the
+    energy to type more and more ...
+
+    This string might be
+    at maximum size I can handle
+
+    +-------+-------------------------+---------------------------+
+    | what  | how                     | who                       |
+    +=======+=========================+===========================+
+    | lorem | that is a dummy string  | Place holder string       |
+    +-------+-------------------------+---------------------------+
+    | ipsum | this is a random strinf | Yes, I am a random string |
+    +-------+-------------------------+---------------------------+""" # noqa
+    assert_rst_strings_are_equal(expected_documentation, actual_documentation)
+
+
+def test_get_rst_picture_reference():
+    actual_pic_ref = get_rst_picture_reference('test1', 'test2', 'test3', 'test4')
+    expected_pic_ref = """
+    .. |test1| image:: test2
+        :alt: test3
+        :target: test4
+    """
+    assert_rst_strings_are_equal(expected_pic_ref, actual_pic_ref)
+
+
+def test_square_up_tables():
+    local_config = config_for_testing.copy()
+    functions = {
+        'MakeAFoo': {
+            'codegen_method': 'public',
+            'returns': 'ViStatus',
+            'method_templates': [{'session_filename': '/cool_template', 'documentation_filename': '/cool_template', 'method_python_name_suffix': '', }, ],
+            'parameters': [
+                {
+                    'direction': 'in',
+                    'enum': None,
+                    'name': 'vi',
+                    'type': 'ViSession',
+                    'documentation': {
+                        'description': 'Identifies a particular instrument session.',
+                    },
+                },
+                {
+                    'direction': 'in',
+                    'enum': None,
+                    'name': 'channelName',
+                    'type': 'ViString',
+                    'documentation': {
+                        'description': 'The channel to call this on.',
+                    },
+                },
+            ],
+            'documentation': {
+                'description': 'Performs a foo, and performs it well.',
+                'table_header': ['Just one'],
+                'table_body': [['Just', 'two'], ['this', 'has', 'three']],
+            },
+        },
+    }
+    local_config['functions'] = functions
+    local_config['attributes'] = {}
+    local_config['enums'] = {}
+
+    square_up_tables(local_config)
+    assert len(local_config['functions']['MakeAFoo']['documentation']['table_header']) == 3
+    for line in local_config['functions']['MakeAFoo']['documentation']['table_body']:
+        assert len(line) == 3
+
+
+config_for_testing = {
+    'session_handle_parameter_name': 'vi',
+    'module_name': 'nifake',
+    'functions': {},
+    'attributes': {},
+    'modules': {
+        'metadata.enums_addon': {}
+    },
+    'custom_types': [],
+}
+
+
+def test_add_notes_re_links():
+    local_config = config_for_testing.copy()
+    local_config['c_function_prefix'] = 'niFake'
+    functions = {
+        'MakeAFoo': {
+            'codegen_method': 'public',
+            'returns': 'ViStatus',
+            'method_templates': [{'session_filename': '/cool_template', 'documentation_filename': '/cool_template', 'method_python_name_suffix': '', }, ],
+            'parameters': [
+                {
+                    'direction': 'in',
+                    'enum': None,
+                    'name': 'vi',
+                    'type': 'ViSession',
+                    'documentation': {
+                        'description': 'Identifies a particular instrument session for niFake_MakeAFoo using NIFAKE_ATTR_READ_WRITE_BOOL. You should use NIFAKE_VAL_BLUE',
+                    },
+                },
+                {
+                    'direction': 'in',
+                    'enum': None,
+                    'name': 'channelName',
+                    'type': 'ViString',
+                    'documentation': {
+                        'description': 'The channel to call this on. Similar to niFake_TakeAFoo using NIFAKE_ATTR_NOT_HERE. Use NIFAKE_VAL_PURPLE',
+                    },
+                },
+            ],
+            'documentation': {
+                'description': 'Performs a foo, and performs it well.',
+            },
+            'python_name': 'make_a_foo',
+            'interpreter_name': 'make_a_foo',
+        },
+    }
+    attributes = {
+        1000000: {
+            'access': 'read-write',
+            'enum': None,
+            'lv_property': 'Fake attributes:Read Write Bool',
+            'name': 'READ_WRITE_BOOL',
+            'type': 'ViBoolean',
+            'documentation': {
+                'description': 'An attribute of type bool with read/write access.',
+            },
+        },
+    }
+    enums = {
+        'Color': {
+            'values': [
+                {
+                    'name': 'NIFAKE_VAL_RED',
+                    'value': 1,
+                    'documentation': {
+                        'description': 'Like blood.',
+                    }
+                },
+                {
+                    'name': 'NIFAKE_VAL_BLUE',
+                    'value': 2,
+                    'documentation': {
+                        'description': 'Like the sky.',
+                    }
+                },
+                {
+                    'name': 'NIFAKE_VAL_YELLOW',
+                    'value': 2,
+                    'documentation': {
+                        'description': 'Like a banana.',
+                    }
+                },
+                {
+                    'name': 'NIFAKE_VAL_BLACK',
+                    'value': 2,
+                    'documentation': {
+                        'description': 'Like this developer\'s conscience.',
+                    }
+                },
+            ],
+            'codegen_method': 'public',
+        },
+    }
+    local_config['functions'] = functions
+    local_config['attributes'] = attributes
+    local_config['enums'] = enums
+
+    add_notes_re_links(local_config)
+
+    assert 'note' not in local_config['functions']['MakeAFoo']['parameters'][0]['documentation']
+    assert func_note_text in local_config['functions']['MakeAFoo']['parameters'][1]['documentation']['note']
+    assert attr_note_text in local_config['functions']['MakeAFoo']['parameters'][1]['documentation']['note']
+    assert enum_note_text in local_config['functions']['MakeAFoo']['parameters'][1]['documentation']['note']
+
diff --git a/build/unit_tests/test_documentation_snippets.py b/build/unit_tests/test_documentation_snippets.py
new file mode 100644
index 000000000..b4e8d0ecf
--- /dev/null
+++ b/build/unit_tests/test_documentation_snippets.py
@@ -0,0 +1,121 @@
+from build.helper.documentation_snippets import *
+
+
+def test_close_function_def_for_doc_note_not_list():
+    '''Testing for lack of syntax error - not actual documentation'''
+    functions = {
+        'close': {
+            'documentation': {
+                'description': 'test',
+                'note': 'test',
+            },
+        },
+    }
+    config = {
+        'close_function': 'close'
+    }
+    close_doc = close_function_def_for_doc(functions, config)
+    assert type(close_doc) is dict
+    return
+
+
+def test_close_function_def_for_doc_note_list():
+    '''Testing for lack of syntax error - not actual documentation'''
+    functions = {
+        'close': {
+            'documentation': {
+                'description': 'test',
+                'note': ['test'],
+            },
+        },
+    }
+    config = {
+        'close_function': 'close'
+    }
+    close_doc = close_function_def_for_doc(functions, config)
+    assert type(close_doc) is dict
+    return
+
+
+def test_close_function_def_for_doc_no_note():
+    '''Testing for lack of syntax error - not actual documentation'''
+    functions = {
+        'close': {
+            'documentation': {
+                'description': 'test',
+            },
+        },
+    }
+    config = {
+        'close_function': 'close'
+    }
+    close_doc = close_function_def_for_doc(functions, config)
+    assert type(close_doc) is dict
+
+
+def test_initiate_function_def_for_doc_note_not_list():
+    '''Testing for lack of syntax error - not actual documentation'''
+    functions = {
+        'Initiate': {
+            'documentation': {
+                'description': 'test',
+                'note': 'test',
+            },
+            'python_name': '_initiate',
+        },
+    }
+    config = {
+        'context_manager_name': {
+            'task': 'acquisition',
+            'initiate_function': 'Initiate',
+            'abort_function': 'Abort',
+        },
+    }
+    initiate_doc = initiate_function_def_for_doc(functions, config)
+    assert type(initiate_doc) is dict
+    return
+
+
+def test_initiate_function_def_for_doc_note_list():
+    '''Testing for lack of syntax error - not actual documentation'''
+    functions = {
+        'Initiate': {
+            'documentation': {
+                'description': 'test',
+                'note': ['test'],
+            },
+            'python_name': '_initiate',
+        },
+    }
+    config = {
+        'context_manager_name': {
+            'task': 'acquisition',
+            'initiate_function': 'Initiate',
+            'abort_function': 'Abort',
+        },
+    }
+    initiate_doc = initiate_function_def_for_doc(functions, config)
+    assert type(initiate_doc) is dict
+    return
+
+
+def test_initiate_function_def_for_doc_no_note():
+    '''Testing for lack of syntax error - not actual documentation'''
+    functions = {
+        'Initiate': {
+            'documentation': {
+                'description': 'test',
+            },
+            'python_name': '_initiate',
+        },
+    }
+    config = {
+        'context_manager_name': {
+            'task': 'acquisition',
+            'initiate_function': 'Initiate',
+            'abort_function': 'Abort',
+        },
+    }
+    initiate_doc = initiate_function_def_for_doc(functions, config)
+    assert type(initiate_doc) is dict
+
diff --git a/build/unit_tests/test_helper.py b/build/unit_tests/test_helper.py
new file mode 100644
index 000000000..437b0234e
--- /dev/null
+++ b/build/unit_tests/test_helper.py
@@ -0,0 +1,135 @@
+from build.helper.helper import *
+
+
+def test_get_development_status():
+    config = {}
+
+    config['module_version'] = '0.0.0.dev0'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '0.0.0'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '0.4.9.dev0'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '0.4.9'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '0.5.0.dev0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '0.5.0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '0.9.9.dev0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '0.9.9'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '1.0.0.dev0'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '1.0.0.a0'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '1.0.0.b0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '1.0.0.c0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '1.0.0.rc0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '1.0.0'
+    assert get_development_status(config) == '5 - Production/Stable'
+
+    config['module_version'] = '1.9.9.dev0'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '1.9.9.a0'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '1.9.9.b0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '1.9.9.c0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '1.9.9.rc0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '1.9.9'
+    assert get_development_status(config) == '5 - Production/Stable'
+
+    config['module_version'] = '9.9.9.dev0'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '9.9.9.a0'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '9.9.9.b0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '9.9.9.c0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '9.9.9.rc0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '9.9.9'
+    assert get_development_status(config) == '5 - Production/Stable'
+
+    config['module_version'] = '19.9.9.dev0'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '19.9.9.a0'
+    assert get_development_status(config) == '3 - Alpha'
+
+    config['module_version'] = '19.9.9.b0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '19.9.9.c0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '19.9.9.rc0'
+    assert get_development_status(config) == '4 - Beta'
+
+    config['module_version'] = '19.9.9'
+    assert get_development_status(config) == '5 - Production/Stable'
+
+
+def test_enum_uses_converter():
+    import pytest
+
+    assert not enum_uses_converter({})
+    assert not enum_uses_converter({
+        'enum_to_converted_value_function_name': None,
+        'converted_value_to_enum_function_name': None
+    })
+
+    assert enum_uses_converter({
+        'enum_to_converted_value_function_name': lambda x: x,
+        'converted_value_to_enum_function_name': lambda x: x
+    })
+
+    with pytest.raises(AssertionError):
+        enum_uses_converter({
+            'enum_to_converted_value_function_name': lambda x: x
+        })
+    with pytest.raises(AssertionError):
+        enum_uses_converter({
+            'converted_value_to_enum_function_name': lambda x: x
+        })
+    with pytest.raises(AssertionError):
+        enum_uses_converter({
+            'enum_to_converted_value_function_name': None,
+            'converted_value_to_enum_function_name': lambda x: x
+        })
+    with pytest.raises(AssertionError):
+        enum_uses_converter({
+            'enum_to_converted_value_function_name': lambda x: x,
+            'converted_value_to_enum_function_name': None
+        })
diff --git a/build/unit_tests/test_metadata_add_all.py b/build/unit_tests/test_metadata_add_all.py
new file mode 100644
index 000000000..642717a1c
--- /dev/null
+++ b/build/unit_tests/test_metadata_add_all.py
@@ -0,0 +1,1143 @@
+from build.helper.metadata_add_all import *
+from build.helper.metadata_add_all import _add_enum_codegen_method
+from build.helper.metadata_add_all import _get_attributes_that_use_enums
+from build.helper.metadata_add_all import _get_functions_that_use_enums
+from build.helper.metadata_add_all import _get_least_restrictive_codegen_method
+
+
+def _compare_values(actual, expected, k):
+    if type(actual) is dict:
+        _compare_dicts(actual, expected)
+    elif type(actual) is list:
+        _compare_lists(actual, expected)
+    else:
+        assert actual == expected, "Value mismatch with key/index '{0}', {1} != {2}".format(k, actual, expected)
+
+
+def _compare_lists(actual, expected):
+    assert type(actual) == type(expected), 'Type mismatch, {0} != {1}'.format(type(actual), type(expected))
+    assert len(actual) == len(expected), 'Length mismatch, {0} != {1}'.format(len(actual), len(expected))
+    for k in range(len(actual)):
+        _compare_values(actual[k], expected[k], k)
+
+
+def _compare_dicts(actual, expected):
+    assert type(actual) == type(expected), 'Type mismatch, {0} != {1}'.format(type(actual), type(expected))
+    for k in actual:
+        assert k in expected, 'Key {0} not in expected'.format(k)
+        _compare_values(actual[k], expected[k], k)
+    for k in expected:
+        assert k in actual, 'Key {0} not in actual'.format(k)
+
+
+functions_input = {
+    'MakeAFoo': {
+        'codegen_method': 'public',
+        'returns': 'ViStatus',
+        'method_templates': [{'session_filename': '/cool_template', 'library_interpreter_filename': '/cool_template', 'documentation_filename': '/cool_template', 'method_python_name_suffix': '', }, ],
+        'parameters': [
+            {
+                'direction': 'in',
+                'enum': None,
+                'name': 'vi',
+                'type': 'ViSession',
+                'documentation': {
+                    'description': 'Identifies a particular instrument session.',
+                },
+            },
+            {
+                'direction': 'in',
+                'enum': None,
+                'name': 'channelName',
+                'python_name': 'name',
+                'is_repeated_capability': False,
+                'type': 'ViString',
+                'documentation': {
+                    'description': 'The channel to call this on.',
+                },
+            },
+            {
+                'direction': 'in',
+                'documentation': {
+                    'description': 'buffer size input',
+                },
+                'enum': None,
+                'name': 'pinDataBufferSize',
+                'type': 'ViInt32'
+            },
+            {
+                'direction': 'in',
+                'documentation': {
+                    'description': 'python-code input',
+                },
+                'enum': None,
+                'name': 'pythonCodeInput',
+                'size': {
+                    'mechanism': 'python-code',
+                    'value': '2 ** 14'
+                },
+                'type': 'ViInt32'
+            },
+            {
+                'direction': 'out',
+                'documentation': {
+                    'description': 'buffer size output',
+                },
+                'enum': None,
+                'name': 'actualNumPinData',
+                'type': 'ViInt32'
+            },
+            {
+                'direction': 'out',
+                'documentation': {
+                    'description': 'buffer',
+                },
+                'enum': None,
+                'name': 'expectedPinStates',
+                'size': {
+                    'mechanism': 'ivi-dance-with-a-twist',
+                    'value': 'pinDataBufferSize',
+                    'value_twist': 'actualNumPinData'
+                },
+                'type': 'ViUInt8[]'
+            },
+            {
+                'direction': 'in',
+                'documentation': {
+                    'description': 'custom type input',
+                },
+                'enum': None,
+                'name': 'customTypeInput',
+                'type': 'struct CustomStruct'
+            },
+            {
+                'direction': 'out',
+                'documentation': {
+                    'description': 'custom type output',
+                },
+                'enum': None,
+                'name': 'customTypeOutput',
+                'type': 'struct CustomStruct'
+            },
+            {
+                'direction': 'in',
+                'documentation': {
+                    'description': 'custom type without struct prefix input',
+                },
+                'enum': None,
+                'name': 'customTypeWithoutStructPrefixInput',
+                'type': 'CustomStruct'
+            },
+            {
+                'direction': 'out',
+                'documentation': {
+                    'description': 'custom type without struct prefix output',
+                },
+                'enum': None,
+                'name': 'customTypeWithoutStructPrefixOutput',
+                'type': 'CustomStruct'
+            },
+        ],
+        'documentation': {
+            'description': 'Performs a foo, and performs it well.',
+        },
+    },
+    'MakeAPrivateMethod': {
+        'codegen_method': 'private',
+        'returns': 'ViStatus',
+        'parameters': [
+            {
+                'direction': 'in',
+                'enum': None,
+                'name': 'vi',
+                'type': 'ViSession',
+                'documentation': {
+                    'description': 'Identifies a particular instrument session.',
+                },
+            },
+            {
+                'direction': 'out',
+                'enum': None,
+                'name': 'status',
+                'type': 'ViString',
+                'documentation': {
+                    'description': 'Return a device status',
+                },
+            },
+            {
+                'direction': 'in',
+                'documentation': {
+                    'description': 'buffer size',
+                },
+                'enum': None,
+                'name': 'dataBufferSize',
+                'type': 'ViInt32'
+            },
+            {
+                'direction': 'out',
+                'documentation': {
+                    'description': 'buffer',
+                },
+                'enum': None,
+                'name': 'data',
+                'size': {
+                    'mechanism': 'ivi-dance',
+                    'value': 'dataBufferSize'
+                },
+                'type': 'ViUInt32[]'
+            },
+        ],
+        'documentation': {
+            'description': 'Perform actions as method defined',
+        },
+    },
+    'MakeANoCodegenMethod': {
+        'codegen_method': 'no',
+        'documentation': {
+            'description': 'This is a method with codegen_method set to no',
+        },
+        'method_name_for_documentation': 'MakeAPublicMethod',
+        'method_templates': [
+            {
+                'session_filename': '/cool_template',
+                'library_interpreter_filename': '/cool_template',
+                'documentation_filename': '/cool_template',
+                'method_python_name_suffix': '',
+            },
+        ],
+        'parameters': [],
+        'returns': 'ViStatus',
+    },
+}
+
+
+functions_expected = {
+    'MakeAFoo': {
+        'name': 'MakeAFoo',
+        'codegen_method': 'public',
+        'use_session_lock': True,
+        'documentation': {
+            'description': 'Performs a foo, and performs it well.'
+        },
+        'has_repeated_capability': False,
+        'is_error_handling': False,
+        'render_in_session_base': False,
+        'method_templates': [{'session_filename': '/cool_template', 'library_interpreter_filename': '/cool_template', 'documentation_filename': '/cool_template', 'method_python_name_suffix': '', }, ],
+        'parameters': [
+            {
+                'ctypes_method_call_snippet': 'vi_ctype',
+                'ctypes_type': 'ViSession',
+                'ctypes_variable_name': 'vi_ctype',
+                'ctypes_type_library_call': 'ViSession',
+                'direction': 'in',
+                'documentation': {
+                    'description': 'Identifies a particular instrument session.'
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': True,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'int',
+                'type_in_documentation': 'int',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': False,
+                'name': 'vi',
+                'grpc_name': 'vi',
+                'python_name': 'vi',
+                'python_name_with_default': 'vi',
+                'python_name_with_doc_default': 'vi',
+                'size': {
+                    'mechanism': 'fixed',
+                    'value': 1
+                },
+                'type': 'ViSession',
+                'interpreter_method_call_snippet': 'self._vi',
+                'grpc_request_snippet': 'vi=self._vi',
+                'use_in_python_api': True,
+                'python_name_or_default_for_init': 'vi',
+            },
+            {
+                'ctypes_method_call_snippet': 'name_ctype',
+                'ctypes_type': 'ViString',
+                'ctypes_variable_name': 'name_ctype',
+                'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
+                'direction': 'in',
+                'documentation': {
+                    'description': 'The channel to call this on.'
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'str',
+                'type_in_documentation': 'str',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': True,
+                'name': 'channelName',
+                'grpc_name': 'name',
+                'python_name': 'name',
+                'python_name_with_default': 'name',
+                'python_name_with_doc_default': 'name',
+                'size': {'mechanism': 'fixed', 'value': 1},
+                'type': 'ViString',
+                'interpreter_method_call_snippet': 'name',
+                'grpc_request_snippet': 'name=name',
+                'use_in_python_api': True,
+                'python_name_or_default_for_init': 'name',
+            },
+            {
+                'ctypes_method_call_snippet': 'pin_data_buffer_size_ctype',
+                'ctypes_type': 'ViInt32',
+                'ctypes_variable_name': 'pin_data_buffer_size_ctype',
+                'ctypes_type_library_call': 'ViInt32',
+                'direction': 'in',
+                'documentation': {
+                    'description': 'buffer size input',
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'int',
+                'type_in_documentation': 'int',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': False,
+                'name': 'pinDataBufferSize',
+                'grpc_name': 'pin_data_buffer_size',
+                'python_name': 'pin_data_buffer_size',
+                'python_name_with_default': 'pin_data_buffer_size',
+                'python_name_with_doc_default': 'pin_data_buffer_size',
+                'size': {
+                    'mechanism': 'fixed',
+                    'value': 1
+                },
+                'type': 'ViInt32',
+                'interpreter_method_call_snippet': 'pin_data_buffer_size',
+                'grpc_request_snippet': 'pin_data_buffer_size=pin_data_buffer_size',
+                'use_in_python_api': False,
+                'python_name_or_default_for_init': 'pin_data_buffer_size',
+            },
+            {
+                'ctypes_method_call_snippet': 'python_code_input_ctype',
+                'ctypes_type': 'ViInt32',
+                'ctypes_variable_name': 'python_code_input_ctype',
+                'ctypes_type_library_call': 'ViInt32',
+                'direction': 'in',
+                'documentation': {
+                    'description': 'python-code input',
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'int',
+                'type_in_documentation': 'int',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': False,
+                'name': 'pythonCodeInput',
+                'grpc_name': 'python_code_input',
+                'python_name': 'python_code_input',
+                'python_name_with_default': 'python_code_input',
+                'python_name_with_doc_default': 'python_code_input',
+                'size': {
+                    'mechanism': 'python-code',
+                    'value': '2 ** 14'
+                },
+                'type': 'ViInt32',
+                'interpreter_method_call_snippet': 'python_code_input',
+                'grpc_request_snippet': 'python_code_input=2 ** 14',
+                'use_in_python_api': True,
+                'python_name_or_default_for_init': 'python_code_input',
+            },
+            {
+                'ctypes_method_call_snippet': 'None if actual_num_pin_data_ctype is None else (ctypes.pointer(actual_num_pin_data_ctype))',
+                'ctypes_type': 'ViInt32',
+                'ctypes_variable_name': 'actual_num_pin_data_ctype',
+                'ctypes_type_library_call': 'ctypes.POINTER(ViInt32)',
+                'direction': 'out',
+                'documentation': {
+                    'description': 'buffer size output',
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'int',
+                'type_in_documentation': 'int',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': False,
+                'name': 'actualNumPinData',
+                'grpc_name': 'actual_num_pin_data',
+                'python_name': 'actual_num_pin_data',
+                'python_name_with_default': 'actual_num_pin_data',
+                'python_name_with_doc_default': 'actual_num_pin_data',
+                'size': {
+                    'mechanism': 'fixed',
+                    'value': 1
+                },
+                'type': 'ViInt32',
+                'interpreter_method_call_snippet': 'actual_num_pin_data',
+                'grpc_request_snippet': 'actual_num_pin_data=actual_num_pin_data',
+                'use_in_python_api': False,
+                'python_name_or_default_for_init': 'actual_num_pin_data',
+            },
+            {
+                'ctypes_method_call_snippet': 'expected_pin_states_ctype',
+                'ctypes_type': 'ViUInt8',
+                'ctypes_variable_name': 'expected_pin_states_ctype',
+                'ctypes_type_library_call': 'ctypes.POINTER(ViUInt8)',
+                'direction': 'out',
+                'documentation': {
+                    'description': 'buffer',
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'int',
+                'type_in_documentation': 'int',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': True,
+                'use_list': True,
+                'is_string': False,
+                'name': 'expectedPinStates',
+                'original_type': 'ViUInt8[]',
+                'grpc_name': 'expected_pin_states',
+                'python_name': 'expected_pin_states',
+                'python_name_with_default': 'expected_pin_states',
+                'python_name_with_doc_default': 'expected_pin_states',
+                'size': {
+                    'mechanism': 'ivi-dance-with-a-twist',
+                    'value': 'pinDataBufferSize',
+                    'value_twist': 'actualNumPinData'
+                },
+                'type': 'ViUInt8',
+                'interpreter_method_call_snippet': 'expected_pin_states',
+                'grpc_request_snippet': 'expected_pin_states=expected_pin_states',
+                'use_in_python_api': True,
+                'python_name_or_default_for_init': 'expected_pin_states',
+            },
+            {
+                'ctypes_method_call_snippet': 'custom_type_input_ctype',
+                'ctypes_type': 'struct_CustomStruct',
+                'ctypes_variable_name': 'custom_type_input_ctype',
+                'ctypes_type_library_call': 'custom_struct.struct_CustomStruct',
+                'direction': 'in',
+                'documentation': {
+                    'description': 'custom type input',
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'CustomStruct',
+                'type_in_documentation': 'CustomStruct',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': False,
+                'name': 'customTypeInput',
+                'grpc_name': 'custom_type_input',
+                'python_name': 'custom_type_input',
+                'python_name_with_default': 'custom_type_input',
+                'python_name_with_doc_default': 'custom_type_input',
+                'size': {
+                    'mechanism': 'fixed',
+                    'value': 1
+                },
+                'type': 'struct_CustomStruct',
+                'interpreter_method_call_snippet': 'custom_type_input',
+                'grpc_request_snippet': 'custom_type_input=custom_type_input._create_copy(grpc_types.CustomStruct)',
+                'use_in_python_api': True,
+                'python_name_or_default_for_init': 'custom_type_input',
+            },
+            {
+                'ctypes_method_call_snippet': 'None if custom_type_output_ctype is None else (ctypes.pointer(custom_type_output_ctype))',
+                'ctypes_type': 'struct_CustomStruct',
+                'ctypes_variable_name': 'custom_type_output_ctype',
+                'ctypes_type_library_call': 'ctypes.POINTER(custom_struct.struct_CustomStruct)',
+                'direction': 'out',
+                'documentation': {
+                    'description': 'custom type output',
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'CustomStruct',
+                'type_in_documentation': 'CustomStruct',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': False,
+                'name': 'customTypeOutput',
+                'grpc_name': 'custom_type_output',
+                'python_name': 'custom_type_output',
+                'python_name_with_default': 'custom_type_output',
+                'python_name_with_doc_default': 'custom_type_output',
+                'size': {
+                    'mechanism': 'fixed',
+                    'value': 1
+                },
+                'type': 'struct_CustomStruct',
+                'interpreter_method_call_snippet': 'custom_type_output',
+                'grpc_request_snippet': 'custom_type_output=custom_type_output._create_copy(grpc_types.CustomStruct)',
+                'use_in_python_api': True,
+                'python_name_or_default_for_init': 'custom_type_output',
+            },
+            {
+                'ctypes_method_call_snippet': 'custom_type_without_struct_prefix_input_ctype',
+                'ctypes_type': 'struct_CustomStruct',
+                'ctypes_variable_name': 'custom_type_without_struct_prefix_input_ctype',
+                'ctypes_type_library_call': 'custom_struct.struct_CustomStruct',
+                'direction': 'in',
+                'documentation': {
+                    'description': 'custom type without struct prefix input',
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'CustomStruct',
+                'type_in_documentation': 'CustomStruct',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': False,
+                'name': 'customTypeWithoutStructPrefixInput',
+                'grpc_name': 'custom_type_without_struct_prefix_input',
+                'python_name': 'custom_type_without_struct_prefix_input',
+                'python_name_with_default': 'custom_type_without_struct_prefix_input',
+                'python_name_with_doc_default': 'custom_type_without_struct_prefix_input',
+                'size': {
+                    'mechanism': 'fixed',
+                    'value': 1
+                },
+                'type': 'struct_CustomStruct',
+                'interpreter_method_call_snippet': 'custom_type_without_struct_prefix_input',
+                'grpc_request_snippet': 'custom_type_without_struct_prefix_input=custom_type_without_struct_prefix_input._create_copy(grpc_types.CustomStruct)',
+                'use_in_python_api': True,
+                'python_name_or_default_for_init': 'custom_type_without_struct_prefix_input',
+            },
+            {
+                'ctypes_method_call_snippet': 'None if custom_type_without_struct_prefix_output_ctype is None else (ctypes.pointer(custom_type_without_struct_prefix_output_ctype))',
+                'ctypes_type': 'struct_CustomStruct',
+                'ctypes_variable_name': 'custom_type_without_struct_prefix_output_ctype',
+                'ctypes_type_library_call': 'ctypes.POINTER(custom_struct.struct_CustomStruct)',
+                'direction': 'out',
+                'documentation': {
+                    'description': 'custom type without struct prefix output',
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'CustomStruct',
+                'type_in_documentation': 'CustomStruct',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': False,
+                'name': 'customTypeWithoutStructPrefixOutput',
+                'grpc_name': 'custom_type_without_struct_prefix_output',
+                'python_name': 'custom_type_without_struct_prefix_output',
+                'python_name_with_default': 'custom_type_without_struct_prefix_output',
+                'python_name_with_doc_default': 'custom_type_without_struct_prefix_output',
+                'size': {
+                    'mechanism': 'fixed',
+                    'value': 1
+                },
+                'type': 'struct_CustomStruct',
+                'interpreter_method_call_snippet': 'custom_type_without_struct_prefix_output',
+                'grpc_request_snippet': 'custom_type_without_struct_prefix_output=custom_type_without_struct_prefix_output._create_copy(grpc_types.CustomStruct)',
+                'use_in_python_api': True,
+                'python_name_or_default_for_init': 'custom_type_without_struct_prefix_output',
+            },
+        ],
+        'python_name': 'make_a_foo',
+        'interpreter_name': 'make_a_foo',
+        'returns': 'ViStatus',
+    },
+    'MakeAPrivateMethod': {
+        'codegen_method': 'private',
+        'returns': 'ViStatus',
+        'use_session_lock': True,
+        'method_templates': [{'session_filename': '/default_method', 'library_interpreter_filename': '/default_method', 'documentation_filename': '/default_method', 'method_python_name_suffix': '', }, ],
+        'parameters': [
+            {
+                'ctypes_method_call_snippet': 'vi_ctype',
+                'direction': 'in',
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'name': 'vi',
+                'type': 'ViSession',
+                'documentation': {
+                    'description': 'Identifies a particular instrument session.'
+                },
+                'grpc_name': 'vi',
+                'python_name': 'vi',
+                'python_type': 'int',
+                'type_in_documentation': 'int',
+                'type_in_documentation_was_calculated': True,
+                'ctypes_variable_name': 'vi_ctype',
+                'ctypes_type': 'ViSession',
+                'ctypes_type_library_call': 'ViSession',
+                'size': {
+                    'mechanism': 'fixed',
+                    'value': 1
+                },
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': False,
+                'python_name_with_default': 'vi',
+                'python_name_with_doc_default': 'vi',
+                'is_repeated_capability': False,
+                'is_session_handle': True,
+                'interpreter_method_call_snippet': 'self._vi',
+                'grpc_request_snippet': 'vi=self._vi',
+                'use_in_python_api': True,
+                'python_name_or_default_for_init': 'vi',
+            },
+            {
+                'ctypes_method_call_snippet': 'status_ctype',
+                'direction': 'out',
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'name': 'status',
+                'type': 'ViString',
+                'documentation': {
+                    'description': 'Return a device status'
+                },
+                'grpc_name': 'status',
+                'python_name': 'status',
+                'python_type': 'str',
+                'type_in_documentation': 'str',
+                'type_in_documentation_was_calculated': True,
+                'ctypes_variable_name': 'status_ctype',
+                'ctypes_type': 'ViString',
+                'ctypes_type_library_call': 'ctypes.POINTER(ViChar)',
+                'size': {
+                    'mechanism': 'fixed',
+                    'value': 1
+                },
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': True,
+                'python_name_with_default': 'status',
+                'python_name_with_doc_default': 'status',
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'interpreter_method_call_snippet': 'status',
+                'grpc_request_snippet': 'status=status',
+                'use_in_python_api': True,
+                'python_name_or_default_for_init': 'status',
+            },
+            {
+                'ctypes_method_call_snippet': 'data_buffer_size_ctype',
+                'ctypes_type': 'ViInt32',
+                'ctypes_variable_name': 'data_buffer_size_ctype',
+                'ctypes_type_library_call': 'ViInt32',
+                'direction': 'in',
+                'documentation': {
+                    'description': 'buffer size',
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'int',
+                'type_in_documentation': 'int',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': False,
+                'use_list': False,
+                'is_string': False,
+                'name': 'dataBufferSize',
+                'grpc_name': 'data_buffer_size',
+                'python_name': 'data_buffer_size',
+                'python_name_with_default': 'data_buffer_size',
+                'python_name_with_doc_default': 'data_buffer_size',
+                'size': {
+                    'mechanism': 'fixed',
+                    'value': 1
+                },
+                'type': 'ViInt32',
+                'interpreter_method_call_snippet': 'data_buffer_size',
+                'grpc_request_snippet': 'data_buffer_size=data_buffer_size',
+                'use_in_python_api': False,
+                'python_name_or_default_for_init': 'data_buffer_size',
+            },
+            {
+                'ctypes_method_call_snippet': 'data_ctype',
+                'ctypes_type': 'ViUInt32',
+                'ctypes_variable_name': 'data_ctype',
+                'ctypes_type_library_call': 'ctypes.POINTER(ViUInt32)',
+                'direction': 'out',
+                'documentation': {
+                    'description': 'buffer',
+                },
+                'is_repeated_capability': False,
+                'is_session_handle': False,
+                'enum': None,
+                'grpc_enum': None,
+                'numpy': False,
+                'python_type': 'int',
+                'type_in_documentation': 'int',
+                'type_in_documentation_was_calculated': True,
+                'use_array': False,
+                'is_buffer': True,
+                'use_list': True,
+                'is_string': False,
+                'name': 'data',
+                'original_type': 'ViUInt32[]',
+                'grpc_name': 'data',
+                'python_name': 'data',
+                'python_name_with_default': 'data',
+                'python_name_with_doc_default': 'data',
+                'size': {
+                    'mechanism': 'ivi-dance',
+                    'value': 'dataBufferSize',
+                },
+                'type': 'ViUInt32',
+                'interpreter_method_call_snippet': 'data',
+                'grpc_request_snippet': 'data=data',
+                'use_in_python_api': True,
+                'python_name_or_default_for_init': 'data',
+            },
+        ],
+        'documentation': {
+            'description': 'Perform actions as method defined'
+        },
+        'name': 'MakeAPrivateMethod',
+        'python_name': '_make_a_private_method',
+        'interpreter_name': 'make_a_private_method',
+        'is_error_handling': False,
+        'render_in_session_base': False,
+        'has_repeated_capability': False
+    },
+    'MakeANoCodegenMethod': {
+        'name': 'MakeANoCodegenMethod',
+        'codegen_method': 'no',
+        'method_name_for_documentation': 'MakeAPublicMethod',
+        'use_session_lock': True,
+        'documentation': {
+            'description': 'This is a method with codegen_method set to no'
+        },
+        'has_repeated_capability': False,
+        'is_error_handling': False,
+        'render_in_session_base': False,
+        'method_templates': [
+            {
+                'session_filename': '/cool_template',
+                'library_interpreter_filename': '/cool_template',
+                'documentation_filename': '/cool_template',
+                'method_python_name_suffix': ''
+            }
+        ],
+        'parameters': [],
+        'python_name': 'make_a_no_codegen_method',
+        'interpreter_name': 'make_a_no_codegen_method',
+        'returns': 'ViStatus',
+    }
+}
+
+
+attributes_input = {
+    1000000: {
+        'access': 'read-write',
+        'enum': None,
+        'lv_property': 'Fake attributes:Read Write Bool',
+        'name': 'READ_WRITE_BOOL',
+        'type': 'ViBoolean',
+        'documentation': {
+            'description': 'An attribute of type bool with read/write access.',
+        },
+    },
+}
+
+
+attributes_expected = {
+    1000000: {
+        'access': 'read-write',
+        'codegen_method': 'public',
+        'documentation': {'description': 'An attribute of type bool with read/write access.'},
+        'enum': None,
+        'grpc_enum': None,
+        'lv_property': 'Fake attributes:Read Write Bool',
+        'name': 'READ_WRITE_BOOL',
+        'python_name': 'read_write_bool',
+        'type': 'ViBoolean',
+        'python_type': 'bool',
+        'type_in_documentation': 'bool',
+        'type_in_documentation_was_calculated': True,
+        'attribute_class': 'AttributeViBoolean',
+    },
+}
+
+
+enums_input = {
+    'Color': {
+        'values': [
+            {
+                'name': 'RED',
+                'value': 1,
+                'documentation': {
+                    'description': 'Like blood.',
+                }
+            },
+            {
+                'name': 'BLUE',
+                'value': 2,
+                'documentation': {
+                    'description': 'Like the sky.',
+                }
+            },
+            {
+                'name': 'YELLOW',
+                'value': 2,
+                'documentation': {
+                    'description': 'Like a banana.',
+                }
+            },
+            {
+                'name': 'BLACK',
+                'value': 2,
+                'documentation': {
+                    'description': 'Like this developer\'s conscience.',
+                }
+            },
+        ],
+    },
+    'EnumWithConverter': {
+        'codegen_method': 'private',
+        'converted_value_to_enum_function_name': 'convert_to_enum_with_converter_enum',
+        'enum_to_converted_value_function_name': 'convert_from_enum_with_converter_enum',
+        'values': [
+            {
+                'converts_to_value': True,
+                'name': 'RED',
+                'value': 1
+            },
+            {
+                'converts_to_value': False,
+                'name': 'BLUE',
+                'value': 2
+            },
+            {
+                'converts_to_value': 'yellow',
+                'name': 'YELLOW',
+                'value': 5
+            },
+            {
+                'converts_to_value': 42,
+                'name': 'BLACK',
+                'value': 42
+            }
+        ]
+    },
+}
+
+
+enums_expected = {
+    'Color': {
+        'codegen_method': 'no',
+        'python_name': 'Color',
+        'values': [
+            {'documentation': {'description': 'Like blood.'}, 'name': 'RED', 'value': 1, 'python_name': 'RED'},
+            {'documentation': {'description': 'Like the sky.'}, 'name': 'BLUE', 'value': 2, 'python_name': 'BLUE'},
+            {'documentation': {'description': 'Like a banana.'}, 'name': 'YELLOW', 'value': 2, 'python_name': 'YELLOW'},
+            {'documentation': {'description': "Like this developer's conscience."}, 'name': 'BLACK', 'value': 2, 'python_name': 'BLACK'}
+        ]
+    },
+    'EnumWithConverter': {
+        'codegen_method': 'private',
+        'python_name': '_EnumWithConverter',
+        'converted_value_to_enum_function_name': 'convert_to_enum_with_converter_enum',
+        'enum_to_converted_value_function_name': 'convert_from_enum_with_converter_enum',
+        'values': [
+            {'name': 'RED', 'value': 1, 'converts_to_value': True, 'python_name': 'RED'},
+            {'name': 'BLUE', 'value': 2, 'converts_to_value': False, 'python_name': 'BLUE'},
+            {'name': 'YELLOW', 'value': 5, 'converts_to_value': 'yellow', 'python_name': 'YELLOW'},
+            {'name': 'BLACK', 'value': 42, 'converts_to_value': 42, 'python_name': 'BLACK'}
+        ]
+    },
+}
+
+
+config_input = {
+    'metadata_version': '1.0',
+    'module_name': 'nifake',
+    'module_version': '1.1.1.dev0',
+    'c_function_prefix': 'niFake_',
+    'driver_name': 'NI-FAKE',
+    'session_class_description': 'An NI-FAKE session to a fake MI driver whose sole purpose is to test nimi-python code generation',
+    'session_handle_parameter_name': 'vi',
+    'library_info':
+    {
+        'Windows': {
+            '32bit': {'name': 'nifake_32.dll', 'type': 'windll'},
+            '64bit': {'name': 'nifake_64.dll', 'type': 'cdll'},
+        },
+        'Linux': {
+            '64bit': {'name': 'libnifake.so', 'type': 'cdll'},
+        },
+    },
+    'context_manager_name': {
+        'task': 'acquisition',
+        'initiate_function': 'Initiate',
+        'abort_function': 'Abort',
+    },
+    'init_function': 'InitWithOptions',
+    'close_function': 'close',
+    'custom_types': [
+        {
+            'ctypes_type': 'struct_CustomStruct',
+            'file_name': 'custom_struct',
+            'grpc_name': 'CustomStruct',
+            'python_name': 'CustomStruct',
+        },
+    ],
+    'enum_whitelist_suffix': ['_POINT_FIVE'],
+    'repeated_capabilities': [
+        {'python_name': 'channels', 'prefix': '', },
+    ],
+    # These are added here strictly for testing.
+    'functions': {},
+    'attributes': {},
+    'modules': {
+        'metadata.enums_addon': {}
+    },
+}
+
+
+config_expected = {
+    'metadata_version': '1.0',
+    'module_name': 'nifake',
+    'module_version': '1.1.1.dev0',
+    'c_function_prefix': 'niFake_',
+    'driver_name': 'NI-FAKE',
+    'session_class_description': 'An NI-FAKE session to a fake MI driver whose sole purpose is to test nimi-python code generation',
+    'session_handle_parameter_name': 'vi',
+    'library_info':
+    {
+        'Windows': {
+            '32bit': {'name': 'nifake_32.dll', 'type': 'windll'},
+            '64bit': {'name': 'nifake_64.dll', 'type': 'cdll'},
+        },
+        'Linux': {
+            '64bit': {'name': 'libnifake.so', 'type': 'cdll'},
+        },
+    },
+    'context_manager_name': {
+        'task': 'acquisition',
+        'initiate_function': 'Initiate',
+        'abort_function': 'Abort',
+    },
+    'init_function': 'InitWithOptions',
+    'close_function': 'close',
+    'custom_types': [
+        {
+            'ctypes_type': 'struct_CustomStruct',
+            'file_name': 'custom_struct',
+            'grpc_name': 'CustomStruct',
+            'python_name': 'CustomStruct',
+        },
+    ],
+    'enum_whitelist_suffix': ['_POINT_FIVE'],
+    'repeated_capabilities': [
+        {'python_name': 'channels', 'prefix': '', },
+    ],
+    'use_locking': True,
+    'functions': functions_expected,
+    'attributes': attributes_expected,
+    'enums': enums_expected,
+    'modules': {
+        'metadata.enums_addon': {}
+    },
+    'uses_nitclk': False,
+}
+
+
+def _do_the_test_add_functions_metadata(functions, expected):
+    actual = copy.deepcopy(functions)
+    actual = add_all_function_metadata(actual, config_input)
+    _compare_dicts(actual, expected)
+
+
+def test_add_functions_metadata_simple():
+    _do_the_test_add_functions_metadata(functions=functions_input, expected=functions_expected)
+
+
+def _do_the_test_add_attributes_metadata(attributes, expected):
+    actual = copy.deepcopy(attributes)
+    actual = add_all_attribute_metadata(actual, config_input)
+    _compare_dicts(actual, expected)
+
+
+def test_add_attributes_metadata_simple():
+    _do_the_test_add_attributes_metadata(attributes=attributes_input, expected=attributes_expected)
+
+
+def _do_the_test_add_enums_metadata(enums, expected):
+    actual = copy.deepcopy(enums)
+    actual = add_all_enum_metadata(actual, config_input)
+    _compare_dicts(actual, expected)
+
+
+def test_add_enums_metadata_simple():
+    _do_the_test_add_enums_metadata(enums_input, expected=enums_expected)
+
+
+def _do_the_test_add_all_metadata(functions, attributes, enums, config, expected):
+    actual = add_all_metadata(functions, attributes, enums, config, persist_output=False)
+    _compare_dicts(actual, expected)
+
+
+def test_add_all_metadata_defaults():
+    actual_functions = copy.deepcopy(functions_input)
+    actual_attributes = copy.deepcopy(attributes_input)
+    actual_enums = copy.deepcopy(enums_input)
+    actual_config = copy.deepcopy(config_input)
+    _do_the_test_add_all_metadata(
+        functions=actual_functions,
+        attributes=actual_attributes,
+        enums=actual_enums,
+        config=actual_config,
+        expected=config_expected)
+
+
+def test_add_all_metadata():
+    actual_functions = copy.deepcopy(functions_input)
+    actual_attributes = copy.deepcopy(attributes_input)
+    actual_enums = copy.deepcopy(enums_input)
+    actual_config = copy.deepcopy(config_input)
+    actual_config['use_locking'] = False
+    expected = copy.deepcopy(config_expected)
+    expected['use_locking'] = False
+    _do_the_test_add_all_metadata(
+        functions=actual_functions,
+        attributes=actual_attributes,
+        enums=actual_enums,
+        config=actual_config,
+        expected=expected)
+
+
+def _setup_inputs_for_enum_codegen_method_tests():
+    actual_enums = copy.deepcopy(enums_input)
+    actual_config = copy.deepcopy(config_input)
+    # Set up minimal input functions metadata
+    actual_config['functions'] = {
+        'PublicMethod': {
+            'codegen_method': 'public',
+            'parameters': [{'enum': None}, {'enum': 'EnumWithConverter'}],
+        },
+        'PythonOnlyMethod': {
+            'codegen_method': 'python-only',
+            'parameters': [{'enum': 'Color'}, {'enum': None}],
+        },
+        'PrivateMethod': {
+            'codegen_method': 'private',
+            'parameters': [{'enum': 'EnumWithConverter'}],
+        },
+        'NoCodegenMethod': {
+            'codegen_method': 'no',
+            'parameters': [{'enum': 'Color'}],
+        },
+    }
+    # Set up minimal input attributes metadata
+    actual_config['attributes'] = {
+        '1000000': {'codegen_method': 'public', 'name': 'PUBLIC_ATTR', 'enum': None},
+        '1000001': {'codegen_method': 'public', 'name': 'PUBLIC_ATTR_2', 'enum': 'EnumWithConverter'},
+        '1000002': {'codegen_method': 'private', 'name': 'PRIVATE_ATTR', 'enum': 'Color'},
+        '1000003': {'codegen_method': 'private', 'name': 'PRIVATE_ATTR_2', 'enum': 'EnumWithConverter'},
+        '1000004': {'codegen_method': 'no', 'name': 'NO_CODEGEN_ATTR', 'enum': 'Color'},
+    }
+    return actual_enums, actual_config
+
+
+def test_add_enum_codegen_method():
+    actual_enums, actual_config = _setup_inputs_for_enum_codegen_method_tests()
+    _add_enum_codegen_method(actual_enums, actual_config)
+    assert actual_enums['Color']['codegen_method'] == 'public'
+    assert actual_enums['EnumWithConverter']['codegen_method'] == 'private'
+
+
+def test_add_enum_codegen_method_error():
+    actual_enums, actual_config = _setup_inputs_for_enum_codegen_method_tests()
+    actual_enums['Color']['codegen_method'] = 'private'
+    expected_error_description = "Codegen_method of enum Color used by functions ['PythonOnlyMethod'] and attributes ['PRIVATE_ATTR'] must be public, is private"
+    try:
+        _add_enum_codegen_method(actual_enums, actual_config)
+    except ValueError as actual_error:
+        actual_error_message = actual_error.args[0]
+        assert actual_error_message == expected_error_description
+
+
+def test_get_functions_that_use_enums():
+    actual_enums, actual_config = _setup_inputs_for_enum_codegen_method_tests()
+    expected_output = {
+        'Color': ['PythonOnlyMethod'],
+        'EnumWithConverter': ['PublicMethod', 'PrivateMethod'],
+    }
+    actual_output = _get_functions_that_use_enums(actual_enums, actual_config)
+    _compare_dicts(actual_output, expected_output)
+
+
+def test_get_attributes_that_use_enums():
+    actual_enums, actual_config = _setup_inputs_for_enum_codegen_method_tests()
+    expected_output = {
+        'Color': ['1000002'],
+        'EnumWithConverter': ['1000001', '1000003'],
+    }
+    actual_output = _get_attributes_that_use_enums(actual_enums, actual_config)
+    _compare_dicts(actual_output, expected_output)
+
+
+def test_get_least_restrictive_codegen_method():
+    for codegen_methods, expected_least_restrictive_codegen_method in (
+        ([], 'no'),
+        (['no'], 'no'),
+        (['private', 'private'], 'private'),
+        (['no', 'private'], 'private'),
+        (['public', 'private'], 'public'),
+        (['private', 'python-only', 'private', 'no'], 'public'),
+        (['public', 'python-only', 'public'], 'public')
+    ):
+        assert _get_least_restrictive_codegen_method(
+            codegen_methods
+        ) == expected_least_restrictive_codegen_method
diff --git a/build/unit_tests/test_metadata_merge_dicts.py b/build/unit_tests/test_metadata_merge_dicts.py
new file mode 100644
index 000000000..b4419a4f7
--- /dev/null
+++ b/build/unit_tests/test_metadata_merge_dicts.py
@@ -0,0 +1,68 @@
+from build.helper.metadata_merge_dicts import *
+
+
+def _do_the_test_merge_dicts(a, b, expected, use_re):
+    actual = a.copy()
+    merge_dicts(actual, b, use_re, 'test')
+    assert expected == actual, "\na = {0}\nb = {1}\nexpected = {2}\nactual = {3}".format(a, b, expected, actual)
+
+
+def test_merge_dict_second_is_empty():
+    a = {'a': 1, 'b': 2}
+    b = {}
+    expected = {'a': 1, 'b': 2}
+    _do_the_test_merge_dicts(a, b, expected, use_re=True)
+
+
+def test_merge_dict_key_exists():
+    a = {'a': 1, 'b': 2}
+    b = {'b': 3}
+    expected = {'a': 1, 'b': 3}
+    _do_the_test_merge_dicts(a, b, expected, use_re=True)
+
+
+def test_merge_dict_recurse():
+    a = {'a': 1, 'b': {'b1': 5, 'b2': 6}}
+    b = {'b': {'b3': 7}}
+    expected = {'a': 1, 'b': {'b1': 5, 'b2': 6, 'b3': 7}}
+    _do_the_test_merge_dicts(a, b, expected, use_re=True)
+
+
+def test_merge_dict_replace_in_list():
+    a = {'a': 1, 'b': {'b1': 5, 'b2': 6}, 'c': ['x', 'y', 'z']}
+    b = {'b': {'b3': 7, 'b1': 8}, 'c': {0: 'r', 1: 's', 2: 't'}}
+    expected = {'a': 1, 'b': {'b1': 8, 'b2': 6, 'b3': 7}, 'c': ['r', 's', 't']}
+    _do_the_test_merge_dicts(a, b, expected, use_re=True)
+
+
+def test_merge_dict_replace_in_dict_and_list():
+    a = {'a': 1, 'b': {'b1': 2, 'b2': 3}, 'c': ['x', 'y', 'z']}
+    b = {'b': {'b3': 7, 'b1': 8}, 'c': {0: 'r', 1: 's', 2: 't'}}
+    expected = {'a': 1, 'b': {'b1': 8, 'b2': 3, 'b3': 7}, 'c': ['r', 's', 't']}
+    _do_the_test_merge_dicts(a, b, expected, use_re=True)
+
+
+def test_merge_dict_with_regex():
+    a = {'aaa': {}, 'aaaa': {'x': 98}, 'aaaaa': {}, 'bbb': {'bbb1': 2, 'bbb2': 3}, 'ccc': ['x', 'y', 'z']}
+    b = {'a+': {'z': 99}}
+    expected = {'aaa': {'z': 99}, 'aaaa': {'x': 98, 'z': 99}, 'aaaaa': {'z': 99}, 'bbb': {'bbb1': 2, 'bbb2': 3}, 'ccc': ['x', 'y', 'z']}
+    _do_the_test_merge_dicts(a, b, expected, use_re=True)
+
+
+def test_merge_dict_with_regex_off():
+    a = {'aaa': {}, 'aaaa': {'x': 98}, 'aaaaa': {}, 'bbb': {'bbb1': 2, 'bbb2': 3}, 'ccc': ['x', 'y', 'z']}
+    b = {'aaa': {'z': 99}}
+    expected = {'aaa': {'z': 99}, 'aaaa': {'x': 98}, 'aaaaa': {}, 'bbb': {'bbb1': 2, 'bbb2': 3}, 'ccc': ['x', 'y', 'z']}
+    _do_the_test_merge_dicts(a, b, expected, use_re=False)
+
+
+def test_merge_dict_top_level_key_missing():
+    a = {'a': 1, 'b': 2}
+    b = {'b': 3, 'c': 4}
+    expected = {'a': 1, 'b': 3, 'c': 4}
+    try:
+        _do_the_test_merge_dicts(a, b, expected, use_re=True)
+        assert False
+    except KeyError:
+        pass
+