@@ -69,3 +69,52 @@ def test___supported_encoding___logging_file_path___returns_assigned_value(
6969 ai_task .in_stream .logging_file_path = file_path # type: ignore[assignment] # https://github.com/ni/nidaqmx-python/issues/613
7070
7171 assert ai_task .in_stream .logging_file_path == pathlib .Path (file_path )
72+
73+
74+ @pytest .mark .grpc_xfail (
75+ reason = "AB#2393811: DAQmxGetLoggingFilePath returns kErrorNULLPtr (-200604) when called from grpc-device." ,
76+ raises = DaqError ,
77+ )
78+ @pytest .mark .parametrize (
79+ "file_path, supported_encodings" ,
80+ [
81+ ("Zu prüfende Daten.tdms" , ["1252" , "iso-8859-1" , "utf-8" ]),
82+ ("Données de test.tdms" , ["1252" , "iso-8859-1" , "utf-8" ]),
83+ ("テストデータ.tdms" , ["932" , "shift-jis" , "utf-8" ]),
84+ ("테스트 데이터.tdms" , ["utf-8" , "euc-kr" ]),
85+ ("测试数据.tdms" , ["utf-8" , "gbk" ]),
86+ ],
87+ )
88+ def test___supported_encoding___configure_logging___returns_assigned_values (
89+ ai_task : Task , file_path : str , supported_encodings : List [str ]
90+ ):
91+ if _get_encoding (ai_task ) not in supported_encodings :
92+ pytest .skip ("requires compatible encoding" )
93+
94+ ai_task .in_stream .configure_logging (file_path )
95+
96+ assert ai_task .in_stream .logging_file_path == pathlib .Path (file_path )
97+
98+
99+ @pytest .mark .grpc_xfail (
100+ reason = "AB#2393811: DAQmxGetLoggingFilePath returns kErrorNULLPtr (-200604) when called from grpc-device." ,
101+ raises = DaqError ,
102+ )
103+ @pytest .mark .parametrize (
104+ "file_path, supported_encodings" ,
105+ [
106+ ("Zu prüfende Daten.tdms" , ["1252" , "iso-8859-1" , "utf-8" ]),
107+ ("Données de test.tdms" , ["1252" , "iso-8859-1" , "utf-8" ]),
108+ ("テストデータ.tdms" , ["932" , "shift-jis" , "utf-8" ]),
109+ ("테스트 데이터.tdms" , ["utf-8" , "euc-kr" ]),
110+ ("测试数据.tdms" , ["utf-8" , "gbk" ]),
111+ ],
112+ )
113+ def test___supported_encoding___start_new_file___returns_assigned_value (
114+ ai_task : Task , file_path : str , supported_encodings : List [str ]
115+ ):
116+ if _get_encoding (ai_task ) not in supported_encodings :
117+ pytest .skip ("requires compatible encoding" )
118+ ai_task .in_stream .start_new_file (file_path )
119+
120+ assert ai_task .in_stream .logging_file_path == pathlib .Path (file_path )
0 commit comments