|
41 | 41 | 'size': {'mechanism': 'fixed', 'value': 1}, |
42 | 42 | 'type': 'ViSession', |
43 | 43 | 'numpy': False, |
44 | | - 'complex_type': 'none', |
| 44 | + 'complex_type': None, |
45 | 45 | 'use_in_python_api': True, |
46 | 46 | }, |
47 | 47 | { # 1 |
|
70 | 70 | 'size': {'mechanism': 'fixed', 'value': 1}, |
71 | 71 | 'type': 'ViInt64', |
72 | 72 | 'numpy': False, |
73 | | - 'complex_type': 'none', |
| 73 | + 'complex_type': None, |
74 | 74 | 'use_in_python_api': True, |
75 | 75 | }, |
76 | 76 | { # 2 |
|
98 | 98 | 'size': {'mechanism': 'fixed', 'value': 256}, |
99 | 99 | 'type': 'ViString', |
100 | 100 | 'numpy': False, |
101 | | - 'complex_type': 'none', |
| 101 | + 'complex_type': None, |
102 | 102 | 'use_in_python_api': True, |
103 | 103 | }, |
104 | 104 | { # 3 |
|
127 | 127 | 'size': {'mechanism': 'python-code', 'value': 'self.get_array_size_for_python_code()'}, |
128 | 128 | 'type': 'custom_struct', |
129 | 129 | 'numpy': False, |
130 | | - 'complex_type': 'none', |
| 130 | + 'complex_type': None, |
131 | 131 | 'use_in_python_api': True, |
132 | 132 | }, |
133 | 133 | { # 4 |
|
153 | 153 | 'size': {'mechanism': 'fixed', 'value': 1}, |
154 | 154 | 'type': 'ViInt32', |
155 | 155 | 'numpy': False, |
156 | | - 'complex_type': 'none', |
| 156 | + 'complex_type': None, |
157 | 157 | 'use_in_python_api': True, |
158 | 158 | }, |
159 | 159 | { # 5 |
|
181 | 181 | 'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'}, |
182 | 182 | 'type': 'ViInt16', |
183 | 183 | 'numpy': False, |
184 | | - 'complex_type': 'none', |
| 184 | + 'complex_type': None, |
185 | 185 | 'use_in_python_api': True, |
186 | 186 | }, |
187 | 187 | { # 6 |
|
210 | 210 | 'size': {'mechanism': 'fixed', 'value': 1}, |
211 | 211 | 'type': 'ViInt16', |
212 | 212 | 'numpy': False, |
213 | | - 'complex_type': 'none', |
| 213 | + 'complex_type': None, |
214 | 214 | 'use_in_python_api': True, |
215 | 215 | }, |
216 | 216 | { # 7 |
|
238 | 238 | 'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'}, |
239 | 239 | 'type': 'ViInt64', |
240 | 240 | 'numpy': True, |
241 | | - 'complex_type': 'none', |
| 241 | + 'complex_type': None, |
242 | 242 | 'numpy_type': 'int64', |
243 | 243 | 'numpy_type_library_call': 'numpy.int64', |
244 | 244 | 'use_in_python_api': True, |
|
260 | 260 | 'interpreter_method_call_snippet': 'number_of_elements_python_code', |
261 | 261 | 'name': 'numberOfElementsPythonCode', |
262 | 262 | 'numpy': False, |
263 | | - 'complex_type': 'none', |
| 263 | + 'complex_type': None, |
264 | 264 | 'python_name': 'number_of_elements_python_code', |
265 | 265 | 'python_name_with_default': 'number_of_elements_python_code', |
266 | 266 | 'python_name_with_doc_default': 'number_of_elements_python_code', |
|
286 | 286 | 'interpreter_method_call_snippet': 'input', |
287 | 287 | 'name': 'input', |
288 | 288 | 'numpy': False, |
289 | | - 'complex_type': 'none', |
| 289 | + 'complex_type': None, |
290 | 290 | 'python_name': 'input', |
291 | 291 | 'python_name_with_default': 'input', |
292 | 292 | 'python_name_with_doc_default': 'input', |
|
315 | 315 | 'interpreter_method_call_snippet': 'input_array', |
316 | 316 | 'name': 'inputArray', |
317 | 317 | 'numpy': False, |
318 | | - 'complex_type': 'none', |
| 318 | + 'complex_type': None, |
319 | 319 | 'python_name': 'input_array', |
320 | 320 | 'python_name_with_default': 'input_array=None', |
321 | 321 | 'python_name_with_doc_default': 'input_array=None', |
|
341 | 341 | 'interpreter_method_call_snippet': 'input_array_size', |
342 | 342 | 'name': 'inputArraySize', |
343 | 343 | 'numpy': False, |
344 | | - 'complex_type': 'none', |
| 344 | + 'complex_type': None, |
345 | 345 | 'python_name': 'input_array_size', |
346 | 346 | 'python_name_with_default': 'input_array_size', |
347 | 347 | 'python_name_with_doc_default': 'input_array_size', |
|
367 | 367 | 'interpreter_method_call_snippet': 'string_size', |
368 | 368 | 'name': 'stringSize', |
369 | 369 | 'numpy': False, |
370 | | - 'complex_type': 'none', |
| 370 | + 'complex_type': None, |
371 | 371 | 'python_name': 'string_size', |
372 | 372 | 'python_name_with_default': 'string_size', |
373 | 373 | 'python_name_with_doc_default': 'string_size', |
|
393 | 393 | 'interpreter_method_call_snippet': 'a_string', |
394 | 394 | 'name': 'aString', |
395 | 395 | 'numpy': False, |
396 | | - 'complex_type': 'none', |
| 396 | + 'complex_type': None, |
397 | 397 | 'python_name': 'a_string', |
398 | 398 | 'python_name_with_default': 'a_string', |
399 | 399 | 'python_name_with_doc_default': 'a_string', |
|
420 | 420 | 'interpreter_method_call_snippet': 'timeout', |
421 | 421 | 'name': 'Timeout', |
422 | 422 | 'numpy': False, |
423 | | - 'complex_type': 'none', |
| 423 | + 'complex_type': None, |
424 | 424 | 'python_name': 'timeout', |
425 | 425 | 'python_name_with_default': 'timeout=1.0', |
426 | 426 | 'python_name_with_doc_default': 'timeout=1.0', |
|
449 | 449 | 'interpreter_method_call_snippet': 'self._repeated_capability', |
450 | 450 | 'name': 'channelList', |
451 | 451 | 'numpy': False, |
452 | | - 'complex_type': 'none', |
| 452 | + 'complex_type': None, |
453 | 453 | 'original_type': 'ViChar[]', |
454 | 454 | 'python_name': 'channel_list', |
455 | 455 | 'python_name_with_default': 'channel_list', |
|
476 | 476 | 'interpreter_method_call_snippet': 'a_string', |
477 | 477 | 'name': 'aString', |
478 | 478 | 'numpy': False, |
479 | | - 'complex_type': 'none', |
| 479 | + 'complex_type': None, |
480 | 480 | 'python_name': 'a_string', |
481 | 481 | 'python_name_with_default': 'a_string', |
482 | 482 | 'python_name_with_doc_default': 'a_string', |
|
509 | 509 | 'size': {'mechanism': 'len', 'value': 'array_in'}, |
510 | 510 | 'type': 'custom_struct', |
511 | 511 | 'numpy': False, |
512 | | - 'complex_type': 'none', |
| 512 | + 'complex_type': None, |
513 | 513 | 'use_in_python_api': True, |
514 | 514 | }, |
515 | 515 | { # 18 |
|
539 | 539 | 'size': {'mechanism': 'fixed', 'value': 256}, |
540 | 540 | 'type': 'ViInt16', |
541 | 541 | 'numpy': False, |
542 | | - 'complex_type': 'none', |
| 542 | + 'complex_type': None, |
543 | 543 | 'use_in_python_api': True, |
544 | 544 | }, |
545 | 545 | { # 19 |
|
559 | 559 | 'interpreter_method_call_snippet': 'a_string_2', |
560 | 560 | 'name': 'aString2', |
561 | 561 | 'numpy': False, |
562 | | - 'complex_type': 'none', |
| 562 | + 'complex_type': None, |
563 | 563 | 'python_name': 'a_string_2', |
564 | 564 | 'python_name_with_default': 'a_string_2', |
565 | 565 | 'python_name_with_doc_default': 'a_string_2', |
|
585 | 585 | 'interpreter_method_call_snippet': 'a_string_3', |
586 | 586 | 'name': 'aStrin3g', |
587 | 587 | 'numpy': False, |
588 | | - 'complex_type': 'none', |
| 588 | + 'complex_type': None, |
589 | 589 | 'python_name': 'a_string_3', |
590 | 590 | 'python_name_with_default': 'a_string_3', |
591 | 591 | 'python_name_with_doc_default': 'a_string_3', |
|
611 | 611 | 'interpreter_method_call_snippet': 'a_string_twist', |
612 | 612 | 'name': 'aStringTwist', |
613 | 613 | 'numpy': False, |
614 | | - 'complex_type': 'none', |
| 614 | + 'complex_type': None, |
615 | 615 | 'python_name': 'a_string_twist', |
616 | 616 | 'python_name_with_default': 'a_string_twist', |
617 | 617 | 'python_name_with_doc_default': 'a_string_twist', |
|
646 | 646 | 'size': {'mechanism': 'fixed', 'value': 1}, |
647 | 647 | 'type': 'ViInt64', |
648 | 648 | 'numpy': False, |
649 | | - 'complex_type': 'none', |
| 649 | + 'complex_type': None, |
650 | 650 | 'use_in_python_api': True, |
651 | 651 | }, |
652 | 652 | { # 23 |
|
666 | 666 | 'interpreter_method_call_snippet': 'string_size_twist', |
667 | 667 | 'name': 'stringSizeTwist', |
668 | 668 | 'numpy': False, |
669 | | - 'complex_type': 'none', |
| 669 | + 'complex_type': None, |
670 | 670 | 'python_name': 'string_size_twist', |
671 | 671 | 'python_name_with_default': 'string_size_twist', |
672 | 672 | 'python_name_with_doc_default': 'string_size_twist', |
|
692 | 692 | 'interpreter_method_call_snippet': 'a_buffer', |
693 | 693 | 'name': 'aBufferArray', |
694 | 694 | 'numpy': False, |
695 | | - 'complex_type': 'none', |
| 695 | + 'complex_type': None, |
696 | 696 | 'python_name': 'a_buffer_array', |
697 | 697 | 'python_name_with_default': 'a_buffer_array', |
698 | 698 | 'python_name_with_doc_default': 'a_buffer_array', |
|
720 | 720 | 'interpreter_method_call_snippet': 'a_buffer', |
721 | 721 | 'name': 'aBufferList', |
722 | 722 | 'numpy': False, |
723 | | - 'complex_type': 'none', |
| 723 | + 'complex_type': None, |
724 | 724 | 'python_name': 'a_buffer_list', |
725 | 725 | 'python_name_with_default': 'a_buffer_list', |
726 | 726 | 'python_name_with_doc_default': 'a_buffer_list', |
|
748 | 748 | 'interpreter_method_call_snippet': 'a_buffer', |
749 | 749 | 'name': 'aBufferTwistArray', |
750 | 750 | 'numpy': False, |
751 | | - 'complex_type': 'none', |
| 751 | + 'complex_type': None, |
752 | 752 | 'python_name': 'a_buffer_twist_array', |
753 | 753 | 'python_name_with_default': 'a_buffer_twist_array', |
754 | 754 | 'python_name_with_doc_default': 'a_buffer_twist_array', |
|
776 | 776 | 'interpreter_method_call_snippet': 'a_buffer', |
777 | 777 | 'name': 'aBufferTwistList', |
778 | 778 | 'numpy': False, |
779 | | - 'complex_type': 'none', |
| 779 | + 'complex_type': None, |
780 | 780 | 'python_name': 'a_buffer_twist_list', |
781 | 781 | 'python_name_with_default': 'a_buffer_twist_list', |
782 | 782 | 'python_name_with_doc_default': 'a_buffer_twist_list', |
|
807 | 807 | 'interpreter_method_call_snippet': 'input_array_2', |
808 | 808 | 'name': 'inputArray2', |
809 | 809 | 'numpy': False, |
810 | | - 'complex_type': 'none', |
| 810 | + 'complex_type': None, |
811 | 811 | 'python_name': 'input_array_2', |
812 | 812 | 'python_name_with_default': 'input_array_2=None', |
813 | 813 | 'python_name_with_doc_default': 'input_array_2=None', |
|
836 | 836 | 'interpreter_method_call_snippet': 'input_array_2', |
837 | 837 | 'name': 'inputArray2', |
838 | 838 | 'numpy': False, |
839 | | - 'complex_type': 'none', |
| 839 | + 'complex_type': None, |
840 | 840 | 'python_api_converter_name': 'convert_to_nitclk_session_num_list', |
841 | 841 | 'python_name': 'input_array_2', |
842 | 842 | 'python_name_with_default': 'input_array_2=None', |
|
866 | 866 | 'interpreter_method_call_snippet': 'input_array_3', |
867 | 867 | 'name': 'inputArray3', |
868 | 868 | 'numpy': False, |
869 | | - 'complex_type': 'none', |
| 869 | + 'complex_type': None, |
870 | 870 | 'python_api_converter_name': 'convert_to_nitclk_session_num_list', |
871 | 871 | 'python_name': 'input_array_3', |
872 | 872 | 'python_name_with_default': 'input_array_3=None', |
|
896 | 896 | 'interpreter_method_call_snippet': 'input_array_3', |
897 | 897 | 'name': 'inputArray4', |
898 | 898 | 'numpy': False, |
899 | | - 'complex_type': 'none', |
| 899 | + 'complex_type': None, |
900 | 900 | 'python_api_converter_name': 'convert_to_nitclk_session_num_list', |
901 | 901 | 'python_name': 'input_array_4', |
902 | 902 | 'python_name_with_default': 'input_array_4=None', |
|
926 | 926 | 'interpreter_method_call_snippet': 'input_array_3', |
927 | 927 | 'name': 'inputArray4', |
928 | 928 | 'numpy': False, |
929 | | - 'complex_type': 'none', |
| 929 | + 'complex_type': None, |
930 | 930 | 'python_api_converter_name': 'convert_to_nitclk_session_num_list', |
931 | 931 | 'python_name': 'input_array_4', |
932 | 932 | 'python_name_with_default': 'input_array_4=None', |
|
953 | 953 | 'interpreter_method_call_snippet': 'a_string_enum', |
954 | 954 | 'name': 'aStringEnum', |
955 | 955 | 'numpy': False, |
956 | | - 'complex_type': 'none', |
| 956 | + 'complex_type': None, |
957 | 957 | 'python_name': 'a_string_enum', |
958 | 958 | 'python_name_with_default': 'a_string_enum', |
959 | 959 | 'python_name_with_doc_default': 'a_string_enum', |
|
981 | 981 | 'interpreter_method_call_snippet': 'indices', |
982 | 982 | 'name': 'indices', |
983 | 983 | 'numpy': False, |
984 | | - 'complex_type': 'none', |
| 984 | + 'complex_type': None, |
985 | 985 | 'original_type': 'ViChar[]', |
986 | 986 | 'python_api_converter_name': 'convert_repeated_capabilities_without_prefix', |
987 | 987 | 'python_name': 'indices', |
|
1018 | 1018 | 'size': {'mechanism': 'passed-in', 'value': 'numberOfElements'}, |
1019 | 1019 | 'type': 'ViInt8', |
1020 | 1020 | 'numpy': False, |
1021 | | - 'complex_type': 'none', |
| 1021 | + 'complex_type': None, |
1022 | 1022 | 'use_in_python_api': True, |
1023 | 1023 | }, |
1024 | 1024 | ] |
@@ -1217,7 +1217,7 @@ def test_get_ctype_variable_declaration_snippet_case_s220(): |
1217 | 1217 |
|
1218 | 1218 | def test_get_ctype_variable_declaration_snippet_case_b510(): |
1219 | 1219 | snippet = get_ctype_variable_declaration_snippet(parameters_for_testing[7], parameters_for_testing, IviDanceStep.NOT_APPLICABLE, config_for_testing, use_numpy_array=True) |
1220 | | - assert snippet == ["output_ctype = _get_ctypes_pointer_for_buffer(value=output) # case B510"] |
| 1220 | + assert snippet == ["output_ctype = _get_ctypes_pointer_for_buffer(value=output, library_type=numpy.ViInt64) # case B510"] |
1221 | 1221 |
|
1222 | 1222 |
|
1223 | 1223 | def test_get_ctype_variable_declaration_snippet_case_b540(): |
|
0 commit comments