File tree Expand file tree Collapse file tree 6 files changed +14
-14
lines changed
Expand file tree Collapse file tree 6 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ config = template_parameters['metadata'].config
66enums = config[' enums' ]
77%>
88from enum import Enum
9- % if any (enums[e].get(' enum_class ' , ' Enum' ) == ' IntFlag' for e in enums):
9+ % if any (enums[e].get(' class ' , ' Enum' ) == ' IntFlag' for e in enums):
1010from enum import IntFlag
1111% endif
1212% for enum_name in sorted (helper.filter_codegen_enums(enums)):
1313
1414
15- class ${ enums[enum_name][' python_name' ]} (${ enums[enum_name].get(' enum_class ' , ' Enum' )} ):
15+ class ${ enums[enum_name][' python_name' ]} (${ enums[enum_name].get(' class ' , ' Enum' )} ):
1616<%
1717 print_list = []
1818%> \
Original file line number Diff line number Diff line change @@ -63,9 +63,9 @@ class IntFlagEnum(IntFlag):
6363 r'''
6464 Flag B option.
6565 '''
66- C = 9223372036854775808
66+ E = 1073741824
6767 r'''
68- Flag C option.
68+ Flag E option.
6969 '''
7070
7171
Original file line number Diff line number Diff line change @@ -839,12 +839,12 @@ def test_return_timedeltas(self):
839839 self .patched_library_interpreter .return_list_of_durations_in_seconds .assert_called_once_with (len (time_values ))
840840
841841 def test_with_valid_intflag_parameter (self ):
842- flags = nifake .IntFlagEnum .C | nifake .IntFlagEnum .A
842+ flags = nifake .IntFlagEnum .E | nifake .IntFlagEnum .A
843843 self .patched_library_interpreter .function_with_intflag_parameter .side_effect = None
844844 self .patched_library_interpreter .function_with_intflag_parameter .return_value = None
845845 with nifake .Session ('dev1' ) as session :
846846 session .function_with_intflag_parameter (flags )
847- self .patched_library_interpreter .function_with_intflag_parameter .assert_called_once_with (9223372036854775809 )
847+ self .patched_library_interpreter .function_with_intflag_parameter .assert_called_once_with (1073741825 )
848848
849849 def test_with_intflag_parameter_invalid (self ):
850850 invalid_flag = 5
Original file line number Diff line number Diff line change 240240 ]
241241 },
242242 'IntFlagEnum' : {
243+ 'class' : 'IntFlag' ,
243244 'codegen_method' : 'public' ,
244- 'enum_class' : 'IntFlag' ,
245245 'values' : [
246246 {
247247 'documentation' : {
259259 },
260260 {
261261 'documentation' : {
262- 'description' : 'Flag C option.'
262+ 'description' : 'Flag E option.'
263263 },
264- 'name' : 'NIFAKE_VAL_FLAG_C ' ,
265- 'value' : 9223372036854775808
264+ 'name' : 'NIFAKE_VAL_FLAG_E ' ,
265+ 'value' : 1073741824
266266 }
267267 ]
268268 },
Original file line number Diff line number Diff line change @@ -839,12 +839,12 @@ def test_return_timedeltas(self):
839839 self .patched_library_interpreter .return_list_of_durations_in_seconds .assert_called_once_with (len (time_values ))
840840
841841 def test_with_valid_intflag_parameter (self ):
842- flags = nifake .IntFlagEnum .C | nifake .IntFlagEnum .A
842+ flags = nifake .IntFlagEnum .E | nifake .IntFlagEnum .A
843843 self .patched_library_interpreter .function_with_intflag_parameter .side_effect = None
844844 self .patched_library_interpreter .function_with_intflag_parameter .return_value = None
845845 with nifake .Session ('dev1' ) as session :
846846 session .function_with_intflag_parameter (flags )
847- self .patched_library_interpreter .function_with_intflag_parameter .assert_called_once_with (9223372036854775809 )
847+ self .patched_library_interpreter .function_with_intflag_parameter .assert_called_once_with (1073741825 )
848848
849849 def test_with_intflag_parameter_invalid (self ):
850850 invalid_flag = 5
Original file line number Diff line number Diff line change 958958 ]
959959 },
960960 'ResetWithOptionsStepsToOmit' : {
961- 'enum_class ' : 'IntFlag' ,
961+ 'class ' : 'IntFlag' ,
962962 'values' : [
963963 {
964964 'documentation' : {
10661066 ]
10671067 },
10681068 'SelfCalibrateRangeStepsToOmit' : {
1069- 'enum_class ' : 'IntFlag' ,
1069+ 'class ' : 'IntFlag' ,
10701070 'values' : [
10711071 {
10721072 'documentation' : {
You can’t perform that action at this time.
0 commit comments