Skip to content

Commit da0419f

Browse files
authored
tests: Enable system tests on Python 3.14 and fix failing generator tests (#1260)
* generator: Sort annotation keys to make tests pass on Python 3.14 * tests: Run system tests on Python 3.14
1 parent 8be7fa6 commit da0419f

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

packages/generator/ni_measurement_plugin_sdk_generator/client/_support.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ def get_configuration_and_output_metadata_by_index(
137137
annotations_dict["ni/enum.values"] = _validate_and_transform_enum_annotations(
138138
configuration.annotations["ni/enum.values"]
139139
)
140+
141+
# In Python 3.13 and earlier, the ConfigurationParameter message sorted the annotation
142+
# keys, but in Python 3.14, it started preserving order. Sort to keep tests passing.
143+
annotations_dict = dict(sorted(annotations_dict.items()))
144+
140145
configuration_parameter_list.append(
141146
ParameterMetadata.initialize(
142147
display_name=configuration.name,
@@ -171,6 +176,11 @@ def get_configuration_and_output_metadata_by_index(
171176
annotations_dict["ni/enum.values"] = _validate_and_transform_enum_annotations(
172177
output.annotations["ni/enum.values"]
173178
)
179+
180+
# In Python 3.13 and earlier, the ConfigurationParameter message sorted the annotation
181+
# keys, but in Python 3.14, it started preserving order. Sort to keep tests passing.
182+
annotations_dict = dict(sorted(annotations_dict.items()))
183+
174184
output_parameter_list.append(
175185
ParameterMetadata.initialize(
176186
display_name=output.name,

packages/generator/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[tox]
77
isolated_build = true
8-
envlist = clean, py{39,310,311,312,313}, py39-{pb4,pb5,pb6}
8+
envlist = clean, py{39,310,311,312,313,314}, py39-{pb4,pb5,pb6}
99

1010
[testenv]
1111
skip_install = true

packages/service/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[tox]
77
isolated_build = true
8-
envlist = clean, py{39,310,311,312,313}-all-extras, py39-{pb4,pb5,pb6}
8+
envlist = clean, py{39,310,311,312,313,314}-all-extras, py39-{pb4,pb5,pb6}
99

1010
[testenv]
1111
skip_install = true

0 commit comments

Comments
 (0)