armodel 1.8.0__py3-none-any.whl → 1.8.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. armodel/models/M2/AUTOSARTemplates/AutosarTopLevelStructure.py +1 -2
  2. armodel/models/M2/AUTOSARTemplates/BswModuleTemplate/BswBehavior.py +14 -14
  3. armodel/models/M2/AUTOSARTemplates/CommonStructure/FlatMap.py +2 -3
  4. armodel/models/M2/AUTOSARTemplates/CommonStructure/Implementation.py +1 -1
  5. armodel/models/M2/AUTOSARTemplates/CommonStructure/ImplementationDataTypes.py +7 -7
  6. armodel/models/M2/AUTOSARTemplates/CommonStructure/InternalBehavior.py +1 -1
  7. armodel/models/M2/AUTOSARTemplates/CommonStructure/ModeDeclaration.py +4 -4
  8. armodel/models/M2/AUTOSARTemplates/CommonStructure/ResourceConsumption/__init__.py +3 -3
  9. armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/ExecutionOrderConstraint.py +3 -3
  10. armodel/models/M2/AUTOSARTemplates/CommonStructure/Timing/TimingConstraint/TimingExtensions.py +3 -3
  11. armodel/models/M2/AUTOSARTemplates/ECUCDescriptionTemplate.py +86 -9
  12. armodel/models/M2/AUTOSARTemplates/ECUCParameterDefTemplate.py +1249 -0
  13. armodel/models/M2/AUTOSARTemplates/GenericStructure/AbstractStructure.py +13 -10
  14. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ARPackage.py +238 -225
  15. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/ArObject.py +5 -4
  16. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/Identifiable.py +46 -25
  17. armodel/models/M2/AUTOSARTemplates/GenericStructure/GeneralTemplateClasses/PrimitiveTypes.py +33 -3
  18. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Components/__init__.py +18 -20
  19. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/Datatype/Datatypes.py +23 -19
  20. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/EndToEndProtection.py +4 -4
  21. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/PortInterface/__init__.py +71 -27
  22. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/ServiceMapping.py +9 -9
  23. armodel/models/M2/AUTOSARTemplates/SWComponentTemplate/SwcInternalBehavior/__init__.py +172 -128
  24. armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreCommunication.py +11 -11
  25. armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/CoreTopology.py +8 -8
  26. armodel/models/M2/AUTOSARTemplates/SystemTemplate/Fibex/FibexCore/EcuInstance.py +2 -2
  27. armodel/models/M2/AUTOSARTemplates/SystemTemplate/NetworkManagement.py +6 -6
  28. armodel/models/M2/AUTOSARTemplates/SystemTemplate/__init__.py +6 -6
  29. armodel/models/M2/MSR/AsamHdo/AdminData.py +101 -8
  30. armodel/parser/abstract_arxml_parser.py +8 -5
  31. armodel/parser/arxml_parser.py +332 -16
  32. armodel/tests/test_armodel/models/test_ECUCParameterDefTemplate.py +116 -0
  33. armodel/tests/test_armodel/models/test_Identifiable.py +85 -0
  34. armodel/tests/test_armodel/models/test_ar_object.py +85 -86
  35. armodel/tests/test_armodel/models/test_ar_package.py +70 -70
  36. armodel/tests/test_armodel/models/test_ar_ref.py +36 -36
  37. armodel/tests/test_armodel/models/test_common_structure.py +37 -35
  38. armodel/tests/test_armodel/models/test_datatype.py +4 -4
  39. armodel/tests/test_armodel/models/test_general_structure.py +19 -18
  40. armodel/tests/test_armodel/models/test_port_interface.py +2 -6
  41. armodel/tests/test_armodel/parser/test_arxml_parser.py +8 -8
  42. armodel/writer/abstract_arxml_writer.py +6 -2
  43. armodel/writer/arxml_writer.py +376 -29
  44. {armodel-1.8.0.dist-info → armodel-1.8.2.dist-info}/METADATA +20 -1
  45. {armodel-1.8.0.dist-info → armodel-1.8.2.dist-info}/RECORD +49 -46
  46. {armodel-1.8.0.dist-info → armodel-1.8.2.dist-info}/LICENSE +0 -0
  47. {armodel-1.8.0.dist-info → armodel-1.8.2.dist-info}/WHEEL +0 -0
  48. {armodel-1.8.0.dist-info → armodel-1.8.2.dist-info}/entry_points.txt +0 -0
  49. {armodel-1.8.0.dist-info → armodel-1.8.2.dist-info}/top_level.txt +0 -0
@@ -1,155 +1,154 @@
1
1
  from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARFloat, ARLiteral, ARNumerical, TimeValue
2
2
  from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.PrimitiveTypes import ARBoolean
3
3
 
4
+
4
5
  class TestARObject:
5
-
6
+
6
7
  def test_ARNumerical(self):
7
8
  numerical = ARNumerical()
8
9
  numerical.value = 123
9
- assert(numerical.value == 123)
10
- assert(numerical.getValue() == 123)
11
- assert(str(numerical) == "123")
12
- assert(numerical.getText() == "123")
10
+ assert (numerical.value == 123)
11
+ assert (numerical.getValue() == 123)
12
+ assert (str(numerical) == "123")
13
+ assert (numerical.getText() == "123")
13
14
 
14
15
  numerical = ARNumerical()
15
16
  numerical.setValue(123)
16
- assert(numerical.value == 123)
17
- assert(numerical.getValue() == 123)
18
- assert(str(numerical) == "123")
19
- assert(numerical.getText() == "123")
17
+ assert (numerical.value == 123)
18
+ assert (numerical.getValue() == 123)
19
+ assert (str(numerical) == "123")
20
+ assert (numerical.getText() == "123")
20
21
 
21
22
  numerical = ARNumerical()
22
23
  numerical.value = "1234"
23
- assert(numerical.value == 1234)
24
- assert(numerical.getValue() == 1234)
25
- assert(str(numerical) == "1234")
26
- assert(numerical.getText() == "1234")
24
+ assert (numerical.value == 1234)
25
+ assert (numerical.getValue() == 1234)
26
+ assert (str(numerical) == "1234")
27
+ assert (numerical.getText() == "1234")
27
28
 
28
29
  numerical = ARNumerical()
29
30
  numerical.setValue("0xFF")
30
- assert(numerical.value == 255)
31
- assert(numerical.getValue() == 255)
32
- assert(str(numerical) == "0xFF")
33
- assert(numerical.getText() == "0xFF")
31
+ assert (numerical.value == 255)
32
+ assert (numerical.getValue() == 255)
33
+ assert (str(numerical) == "0xFF")
34
+ assert (numerical.getText() == "0xFF")
34
35
 
35
36
  def test_ARLiteral(self):
36
37
  literal = ARLiteral()
37
- assert(literal.value == "")
38
- assert(str(literal) == "")
39
- assert(literal.getValue() == "")
40
- assert(literal.getText() == "")
38
+ assert (literal.value == "")
39
+ assert (str(literal) == "")
40
+ assert (literal.getValue() == "")
41
+ assert (literal.getText() == "")
41
42
 
42
43
  literal = ARLiteral()
43
44
  literal.value = "Literal"
44
- assert(literal.value == "Literal")
45
- assert(str(literal) == "Literal")
46
- assert(literal.getValue() == "Literal")
47
- assert(literal.getText() == "Literal")
45
+ assert (literal.value == "Literal")
46
+ assert (str(literal) == "Literal")
47
+ assert (literal.getValue() == "Literal")
48
+ assert (literal.getText() == "Literal")
48
49
 
49
50
  literal = ARLiteral()
50
51
  literal.setValue("Literal1")
51
- assert(literal.value == "Literal1")
52
- assert(str(literal) == "Literal1")
53
- assert(literal.getValue() == "Literal1")
54
- assert(literal.getText() == "Literal1")
55
-
52
+ assert (literal.value == "Literal1")
53
+ assert (str(literal) == "Literal1")
54
+ assert (literal.getValue() == "Literal1")
55
+ assert (literal.getText() == "Literal1")
56
+
56
57
  literal = ARLiteral()
57
58
  literal.setValue(1234)
58
- assert(literal.value == "1234")
59
- assert(str(literal) == "1234")
60
- assert(literal.getValue() == "1234")
61
- assert(literal.getText() == "1234")
62
-
59
+ assert (literal.value == "1234")
60
+ assert (str(literal) == "1234")
61
+ assert (literal.getValue() == "1234")
62
+ assert (literal.getText() == "1234")
63
63
 
64
64
  def test_ARFloat(self):
65
65
  numerical = ARFloat()
66
66
  numerical.value = 123
67
- assert(numerical.value == 123.0)
68
- assert(numerical.getValue() == 123.0)
69
- assert(str(numerical) == "123.0")
70
- assert(numerical.getText() == "123.0")
67
+ assert (numerical.value == 123.0)
68
+ assert (numerical.getValue() == 123.0)
69
+ assert (str(numerical) == "123.0")
70
+ assert (numerical.getText() == "123.0")
71
71
 
72
72
  numerical = ARFloat()
73
73
  numerical.setValue(123)
74
- assert(numerical.value == 123)
75
- assert(numerical.getValue() == 123)
76
- assert(str(numerical) == "123.0")
77
- assert(numerical.getText() == "123.0")
74
+ assert (numerical.value == 123)
75
+ assert (numerical.getValue() == 123)
76
+ assert (str(numerical) == "123.0")
77
+ assert (numerical.getText() == "123.0")
78
78
 
79
79
  numerical = ARFloat()
80
80
  numerical.value = 1234.12
81
- assert(numerical.value == 1234.12)
82
- assert(numerical.getValue() == 1234.12)
83
- assert(str(numerical) == "1234.12")
84
- assert(numerical.getText() == "1234.12")
81
+ assert (numerical.value == 1234.12)
82
+ assert (numerical.getValue() == 1234.12)
83
+ assert (str(numerical) == "1234.12")
84
+ assert (numerical.getText() == "1234.12")
85
85
 
86
86
  numerical = ARFloat()
87
87
  numerical.value = "1234.12"
88
- assert(numerical.value == 1234.12)
89
- assert(numerical.getValue() == 1234.12)
90
- assert(str(numerical) == "1234.12")
91
- assert(numerical.getText() == "1234.12")
88
+ assert (numerical.value == 1234.12)
89
+ assert (numerical.getValue() == 1234.12)
90
+ assert (str(numerical) == "1234.12")
91
+ assert (numerical.getText() == "1234.12")
92
92
 
93
93
  numerical = ARFloat()
94
94
  numerical.value = "1234.0"
95
- assert(numerical.value == 1234)
96
- assert(numerical.getValue() == 1234)
97
- assert(str(numerical) == "1234.0")
98
- assert(numerical.getText() == "1234.0")
95
+ assert (numerical.value == 1234)
96
+ assert (numerical.getValue() == 1234)
97
+ assert (str(numerical) == "1234.0")
98
+ assert (numerical.getText() == "1234.0")
99
99
 
100
100
  numerical = ARFloat()
101
101
  numerical.value = "1234.000000"
102
- assert(numerical.value == 1234)
103
- assert(numerical.getValue() == 1234)
104
- assert(str(numerical) == "1234.000000")
105
- assert(numerical.getText() == "1234.000000")
102
+ assert (numerical.value == 1234)
103
+ assert (numerical.getValue() == 1234)
104
+ assert (str(numerical) == "1234.000000")
105
+ assert (numerical.getText() == "1234.000000")
106
106
 
107
107
  def test_ARBoolean(self):
108
108
  flag = ARBoolean()
109
109
  flag.value = False
110
- assert(flag.value == False)
111
- assert(flag.getValue() == False)
112
- assert(str(flag) == "false")
113
- assert(flag.getText() == "false")
110
+ assert not flag.value
111
+ assert (flag.getValue() == False)
112
+ assert (str(flag) == "false")
113
+ assert (flag.getText() == "false")
114
114
 
115
115
  flag = ARBoolean()
116
116
  flag.value = 0
117
- assert(flag.value == False)
118
- assert(flag.getValue() == False)
119
- assert(str(flag) == "0")
120
- assert(flag.getText() == "0")
117
+ assert (flag.value == False)
118
+ assert (flag.getValue() == False)
119
+ assert (str(flag) == "0")
120
+ assert (flag.getText() == "0")
121
121
 
122
122
  flag = ARBoolean()
123
123
  flag.value = "0"
124
- assert(flag.value == False)
125
- assert(flag.getValue() == False)
126
- assert(str(flag) == "0")
127
- assert(flag.getText() == "0")
124
+ assert (flag.value == False)
125
+ assert (flag.getValue() == False)
126
+ assert (str(flag) == "0")
127
+ assert (flag.getText() == "0")
128
128
 
129
129
  flag = ARBoolean()
130
130
  flag.value = True
131
- assert(flag.value == True)
132
- assert(flag.getValue() == True)
133
- assert(str(flag) == "true")
134
- assert(flag.getText() == "true")
131
+ assert (flag.value == True)
132
+ assert (flag.getValue() == True)
133
+ assert (str(flag) == "true")
134
+ assert (flag.getText() == "true")
135
135
 
136
136
  flag = ARBoolean()
137
137
  flag.value = 1
138
- assert(flag.value == True)
139
- assert(flag.getValue() == True)
140
- assert(str(flag) == "1")
141
- assert(flag.getText() == "1")
138
+ assert (flag.value == True)
139
+ assert (flag.getValue() == True)
140
+ assert (str(flag) == "1")
141
+ assert (flag.getText() == "1")
142
142
 
143
143
  flag = ARBoolean()
144
144
  flag.value = "100"
145
- assert(flag.value == True)
146
- assert(flag.getValue() == True)
147
- assert(str(flag) == "100")
148
- assert(flag.getText() == "100")
145
+ assert (flag.value == True)
146
+ assert (flag.getValue() == True)
147
+ assert (str(flag) == "100")
148
+ assert (flag.getText() == "100")
149
149
 
150
-
151
150
  def test_TimeValue(self):
152
151
  value = TimeValue()
153
152
  value.setValue("0.01")
154
- assert(value.getValue() == 0.01)
155
- assert(value.getText() == "0.01")
153
+ assert (value.getValue() == 0.01)
154
+ assert (value.getText() == "0.01")
@@ -8,12 +8,14 @@ from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Iden
8
8
  from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import Identifiable, MultilanguageReferrable, Referrable
9
9
  from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArObject import ARObject
10
10
  from ....models.M2.AUTOSARTemplates.CommonStructure.ImplementationDataTypes import ImplementationDataType
11
- from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Components import ApplicationSwComponentType, AtomicSwComponentType, EcuAbstractionSwComponentType, SwComponentType
11
+ from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Components import ApplicationSwComponentType, AtomicSwComponentType
12
+ from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Components import EcuAbstractionSwComponentType, SwComponentType
12
13
  from ....models.M2.AUTOSARTemplates.AutosarTopLevelStructure import AUTOSAR
13
14
  from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Datatype.Datatypes import DataTypeMappingSet
14
15
  from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.Identifiable import ARElement
15
16
  from ....models.M2.MSR.AsamHdo.ComputationMethod import CompuMethod
16
- from ....models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerInterface, DataInterface, PortInterface, SenderReceiverInterface
17
+ from ....models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import ClientServerInterface, DataInterface, PortInterface
18
+ from ....models.M2.AUTOSARTemplates.SWComponentTemplate.PortInterface import SenderReceiverInterface
17
19
  from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Components import ServiceSwComponentType
18
20
  from ....models.M2.AUTOSARTemplates.SWComponentTemplate.Components import CompositionSwComponentType
19
21
 
@@ -36,6 +38,7 @@ class TestAUTOSAR:
36
38
 
37
39
  def test_autosar(self):
38
40
  document = AUTOSAR.getInstance()
41
+ document.clear()
39
42
  assert (isinstance(document, CollectableElement))
40
43
  assert (isinstance(document, AUTOSAR))
41
44
  assert (len(document.getARPackages()) == 0)
@@ -52,10 +55,10 @@ class TestAUTOSAR:
52
55
  ar_package = document.find("/sw_package")
53
56
  assert ("sw_package" == ar_package.short_name)
54
57
 
55
- assert(isinstance(ar_package, ARObject))
56
- assert(isinstance(ar_package, Identifiable))
57
- assert(isinstance(ar_package, Referrable))
58
- assert(isinstance(ar_package, MultilanguageReferrable))
58
+ assert (isinstance(ar_package, ARObject))
59
+ assert (isinstance(ar_package, Identifiable))
60
+ assert (isinstance(ar_package, Referrable))
61
+ assert (isinstance(ar_package, MultilanguageReferrable))
59
62
 
60
63
 
61
64
  class TestARPackage:
@@ -73,8 +76,7 @@ class TestARPackage:
73
76
 
74
77
  ar_package_level2 = ar_package_level1.createARPackage("package_level2")
75
78
  assert (ar_package_level2.short_name == 'package_level2')
76
- assert (ar_package_level2.full_name ==
77
- "/package_level1/package_level2")
79
+ assert (ar_package_level2.full_name == "/package_level1/package_level2")
78
80
  assert (len(ar_package_level1.getARPackages()) == 1)
79
81
  assert (ar_package_level1.getARPackages()[0] == ar_package_level2)
80
82
 
@@ -85,13 +87,11 @@ class TestARPackage:
85
87
  def test_createEcuAbstractionSwComponentType(self):
86
88
  document = AUTOSAR.getInstance()
87
89
  ar_root = document.createARPackage("AUTOSAR")
88
- sw_component_type = ar_root.createEcuAbstractionSwComponentType(
89
- "ecu_abstract_sw_component")
90
- assert(sw_component_type.short_name == "ecu_abstract_sw_component")
91
- assert(isinstance(sw_component_type, EcuAbstractionSwComponentType))
90
+ sw_component_type = ar_root.createEcuAbstractionSwComponentType("ecu_abstract_sw_component")
91
+ assert (sw_component_type.short_name == "ecu_abstract_sw_component")
92
+ assert (isinstance(sw_component_type, EcuAbstractionSwComponentType))
92
93
 
93
- find_component_type = document.find(
94
- "/AUTOSAR/ecu_abstract_sw_component")
94
+ find_component_type = document.find("/AUTOSAR/ecu_abstract_sw_component")
95
95
  assert (find_component_type == sw_component_type)
96
96
  assert (find_component_type.short_name == "ecu_abstract_sw_component")
97
97
 
@@ -100,17 +100,17 @@ class TestARPackage:
100
100
  ar_root = document.createARPackage("AUTOSAR")
101
101
  sw_component_type = ar_root.createApplicationSwComponentType(
102
102
  "application_sw_component")
103
- assert(sw_component_type.short_name == "application_sw_component")
104
-
105
- assert(isinstance(sw_component_type, ARElement))
106
- assert(isinstance(sw_component_type, AtomicSwComponentType))
107
- assert(isinstance(sw_component_type, CollectableElement))
108
- assert(isinstance(sw_component_type, Identifiable))
109
- assert(isinstance(sw_component_type, MultilanguageReferrable))
110
- assert(isinstance(sw_component_type, PackageableElement))
111
- assert(isinstance(sw_component_type, Referrable))
112
- assert(isinstance(sw_component_type, SwComponentType))
113
- assert(isinstance(sw_component_type, ApplicationSwComponentType))
103
+ assert (sw_component_type.short_name == "application_sw_component")
104
+
105
+ assert (isinstance(sw_component_type, ARElement))
106
+ assert (isinstance(sw_component_type, AtomicSwComponentType))
107
+ assert (isinstance(sw_component_type, CollectableElement))
108
+ assert (isinstance(sw_component_type, Identifiable))
109
+ assert (isinstance(sw_component_type, MultilanguageReferrable))
110
+ assert (isinstance(sw_component_type, PackageableElement))
111
+ assert (isinstance(sw_component_type, Referrable))
112
+ assert (isinstance(sw_component_type, SwComponentType))
113
+ assert (isinstance(sw_component_type, ApplicationSwComponentType))
114
114
 
115
115
  find_component_type = document.find(
116
116
  "/AUTOSAR/application_sw_component")
@@ -122,17 +122,17 @@ class TestARPackage:
122
122
  ar_root = document.createARPackage("AUTOSAR")
123
123
  sw_component_type = ar_root.createServiceSwComponentType(
124
124
  "service_sw_component")
125
- assert(sw_component_type.short_name == "service_sw_component")
126
-
127
- assert(isinstance(sw_component_type, ARElement))
128
- assert(isinstance(sw_component_type, AtomicSwComponentType))
129
- assert(isinstance(sw_component_type, CollectableElement))
130
- assert(isinstance(sw_component_type, Identifiable))
131
- assert(isinstance(sw_component_type, MultilanguageReferrable))
132
- assert(isinstance(sw_component_type, PackageableElement))
133
- assert(isinstance(sw_component_type, Referrable))
134
- assert(isinstance(sw_component_type, SwComponentType))
135
- assert(isinstance(sw_component_type, ServiceSwComponentType))
125
+ assert (sw_component_type.short_name == "service_sw_component")
126
+
127
+ assert (isinstance(sw_component_type, ARElement))
128
+ assert (isinstance(sw_component_type, AtomicSwComponentType))
129
+ assert (isinstance(sw_component_type, CollectableElement))
130
+ assert (isinstance(sw_component_type, Identifiable))
131
+ assert (isinstance(sw_component_type, MultilanguageReferrable))
132
+ assert (isinstance(sw_component_type, PackageableElement))
133
+ assert (isinstance(sw_component_type, Referrable))
134
+ assert (isinstance(sw_component_type, SwComponentType))
135
+ assert (isinstance(sw_component_type, ServiceSwComponentType))
136
136
 
137
137
  find_component_type = document.find("/AUTOSAR/service_sw_component")
138
138
  assert (find_component_type == sw_component_type)
@@ -143,16 +143,16 @@ class TestARPackage:
143
143
  ar_root = document.createARPackage("AUTOSAR")
144
144
  sw_component_type = ar_root.createCompositionSwComponentType(
145
145
  "composition_sw_component")
146
- assert(sw_component_type.short_name == "composition_sw_component")
146
+ assert (sw_component_type.short_name == "composition_sw_component")
147
147
 
148
- assert(isinstance(sw_component_type, ARElement))
149
- assert(isinstance(sw_component_type, CollectableElement))
150
- assert(isinstance(sw_component_type, Identifiable))
151
- assert(isinstance(sw_component_type, MultilanguageReferrable))
152
- assert(isinstance(sw_component_type, PackageableElement))
153
- assert(isinstance(sw_component_type, Referrable))
154
- assert(isinstance(sw_component_type, SwComponentType))
155
- assert(isinstance(sw_component_type, CompositionSwComponentType))
148
+ assert (isinstance(sw_component_type, ARElement))
149
+ assert (isinstance(sw_component_type, CollectableElement))
150
+ assert (isinstance(sw_component_type, Identifiable))
151
+ assert (isinstance(sw_component_type, MultilanguageReferrable))
152
+ assert (isinstance(sw_component_type, PackageableElement))
153
+ assert (isinstance(sw_component_type, Referrable))
154
+ assert (isinstance(sw_component_type, SwComponentType))
155
+ assert (isinstance(sw_component_type, CompositionSwComponentType))
156
156
 
157
157
  find_component_type = document.find(
158
158
  "/AUTOSAR/composition_sw_component")
@@ -164,17 +164,17 @@ class TestARPackage:
164
164
  ar_root = document.createARPackage("AUTOSAR")
165
165
  instance_if = ar_root.createSenderReceiverInterface(
166
166
  "sender_receiver_interface")
167
- assert(instance_if.short_name == "sender_receiver_interface")
168
-
169
- assert(isinstance(instance_if, ARElement))
170
- assert(isinstance(instance_if, CollectableElement))
171
- assert(isinstance(instance_if, DataInterface))
172
- assert(isinstance(instance_if, Identifiable))
173
- assert(isinstance(instance_if, MultilanguageReferrable))
174
- assert(isinstance(instance_if, PackageableElement))
175
- assert(isinstance(instance_if, PortInterface))
176
- assert(isinstance(instance_if, Referrable))
177
- assert(isinstance(instance_if, SenderReceiverInterface))
167
+ assert (instance_if.short_name == "sender_receiver_interface")
168
+
169
+ assert (isinstance(instance_if, ARElement))
170
+ assert (isinstance(instance_if, CollectableElement))
171
+ assert (isinstance(instance_if, DataInterface))
172
+ assert (isinstance(instance_if, Identifiable))
173
+ assert (isinstance(instance_if, MultilanguageReferrable))
174
+ assert (isinstance(instance_if, PackageableElement))
175
+ assert (isinstance(instance_if, PortInterface))
176
+ assert (isinstance(instance_if, Referrable))
177
+ assert (isinstance(instance_if, SenderReceiverInterface))
178
178
 
179
179
  find_component = document.find("/AUTOSAR/sender_receiver_interface")
180
180
  assert (find_component == instance_if)
@@ -190,8 +190,8 @@ class TestARPackage:
190
190
  ar_root = document.createARPackage("AUTOSAR")
191
191
  instance_if = ar_root.createClientServerInterface(
192
192
  "client_server_interface")
193
- assert(instance_if.short_name == "client_server_interface")
194
- assert(isinstance(instance_if, ClientServerInterface))
193
+ assert (instance_if.short_name == "client_server_interface")
194
+ assert (isinstance(instance_if, ClientServerInterface))
195
195
 
196
196
  find_component = document.find("/AUTOSAR/client_server_interface")
197
197
  assert (find_component == instance_if)
@@ -207,8 +207,8 @@ class TestARPackage:
207
207
  ar_root = document.createARPackage("AUTOSAR")
208
208
  data_type = ar_root.createApplicationPrimitiveDataType(
209
209
  "application_primitive_data_type")
210
- assert(data_type.short_name == "application_primitive_data_type")
211
- assert(isinstance(data_type, ApplicationPrimitiveDataType))
210
+ assert (data_type.short_name == "application_primitive_data_type")
211
+ assert (isinstance(data_type, ApplicationPrimitiveDataType))
212
212
 
213
213
  find_component = document.find(
214
214
  "/AUTOSAR/application_primitive_data_type")
@@ -225,8 +225,8 @@ class TestARPackage:
225
225
  ar_root = document.createARPackage("AUTOSAR")
226
226
  data_type = ar_root.createApplicationRecordDataType(
227
227
  "application_record_data_type")
228
- assert(data_type.short_name == "application_record_data_type")
229
- assert(isinstance(data_type, ApplicationRecordDataType))
228
+ assert (data_type.short_name == "application_record_data_type")
229
+ assert (isinstance(data_type, ApplicationRecordDataType))
230
230
 
231
231
  find_component = document.find("/AUTOSAR/application_record_data_type")
232
232
  assert (find_component == data_type)
@@ -237,8 +237,8 @@ class TestARPackage:
237
237
  ar_root = document.createARPackage("AUTOSAR")
238
238
  data_type = ar_root.createImplementationDataType(
239
239
  "implementation_data_type")
240
- assert(data_type.short_name == "implementation_data_type")
241
- assert(isinstance(data_type, ImplementationDataType))
240
+ assert (data_type.short_name == "implementation_data_type")
241
+ assert (isinstance(data_type, ImplementationDataType))
242
242
 
243
243
  find_component = document.find("/AUTOSAR/implementation_data_type")
244
244
  assert (find_component == data_type)
@@ -253,8 +253,8 @@ class TestARPackage:
253
253
  document = AUTOSAR.getInstance()
254
254
  ar_root = document.createARPackage("AUTOSAR")
255
255
  data_type = ar_root.createSwBaseType("sw_base_type")
256
- assert(data_type.short_name == "sw_base_type")
257
- assert(isinstance(data_type, SwBaseType))
256
+ assert (data_type.short_name == "sw_base_type")
257
+ assert (isinstance(data_type, SwBaseType))
258
258
 
259
259
  find_component = document.find("/AUTOSAR/sw_base_type")
260
260
  assert (find_component == data_type)
@@ -268,8 +268,8 @@ class TestARPackage:
268
268
  document = AUTOSAR.getInstance()
269
269
  ar_root = document.createARPackage("AUTOSAR")
270
270
  mapping_set = ar_root.createDataTypeMappingSet("data_type_mapping_set")
271
- assert(mapping_set.short_name == "data_type_mapping_set")
272
- assert(isinstance(mapping_set, DataTypeMappingSet))
271
+ assert (mapping_set.short_name == "data_type_mapping_set")
272
+ assert (isinstance(mapping_set, DataTypeMappingSet))
273
273
 
274
274
  find_component = document.find("/AUTOSAR/data_type_mapping_set")
275
275
  assert (find_component == mapping_set)
@@ -284,8 +284,8 @@ class TestARPackage:
284
284
  document = AUTOSAR.getInstance()
285
285
  ar_root = document.createARPackage("AUTOSAR")
286
286
  compu_method = ar_root.createCompuMethod("compu_method")
287
- assert(compu_method.short_name == "compu_method")
288
- assert(isinstance(compu_method, CompuMethod))
287
+ assert (compu_method.short_name == "compu_method")
288
+ assert (isinstance(compu_method, CompuMethod))
289
289
 
290
290
  find_component = document.find("/AUTOSAR/compu_method")
291
291
  assert (find_component == compu_method)
@@ -14,68 +14,68 @@ from ....models.M2.AUTOSARTemplates.GenericStructure.GeneralTemplateClasses.ArOb
14
14
  class TestARRef:
15
15
  def test_RefType(self):
16
16
  ref_type = RefType()
17
- assert(ref_type.getBase() == None)
18
- assert(ref_type.getValue() == None)
19
- assert(ref_type.getDest() == None)
17
+ assert (ref_type.getBase() == None)
18
+ assert (ref_type.getValue() == None)
19
+ assert (ref_type.getDest() == None)
20
20
 
21
21
  def test_TRefType(self):
22
22
  ref_type = TRefType()
23
- assert(ref_type.getBase() == None)
24
- assert(ref_type.getValue() == None)
25
- assert(ref_type.getDest() == None)
26
-
23
+ assert (ref_type.getBase() == None)
24
+ assert (ref_type.getValue() == None)
25
+ assert (ref_type.getDest() == None)
27
26
 
28
27
  def test_AutosarVariableRef(self):
29
28
  ref_type = AutosarVariableRef()
30
- assert(ref_type != None)
31
- assert(ref_type.autosarVariableIRef == None)
32
- assert(ref_type.autosarVariableInImplDatatype == None)
33
- assert(ref_type.localVariableRef == None)
29
+ assert (ref_type != None)
30
+ assert (ref_type.autosarVariableIRef == None)
31
+ assert (ref_type.autosarVariableInImplDatatype == None)
32
+ assert (ref_type.localVariableRef == None)
34
33
 
35
34
  def test_AtpInstanceRef(self):
36
35
  with pytest.raises(NotImplementedError) as err:
37
36
  ref_type = AtpInstanceRef()
38
- assert(str(err.value) == "AtpInstanceRef is an abstract class.")
37
+ assert (str(err.value) == "AtpInstanceRef is an abstract class.")
39
38
 
40
39
  def test_ProvidedPortPrototypeInstanceRef(self):
41
40
  ref_type = PPortInCompositionInstanceRef()
42
- assert(ref_type != None)
43
- assert(ref_type.getContextComponentRef() == None)
44
- assert(ref_type.getTargetPPortRef() == None)
41
+ assert (ref_type != None)
42
+ assert (ref_type.getContextComponentRef() == None)
43
+ assert (ref_type.getTargetPPortRef() == None)
45
44
 
46
45
  def test_RequiredPortPrototypeInstanceRef(self):
47
46
  ref_type = RPortInCompositionInstanceRef()
48
- assert(ref_type != None)
49
- assert(ref_type.getContextComponentRef() == None)
50
- assert(ref_type.getTargetRPortRef() == None)
47
+ assert (ref_type != None)
48
+ assert (ref_type.getContextComponentRef() == None)
49
+ assert (ref_type.getTargetRPortRef() == None)
51
50
 
52
51
  def test_ArVariableInImplementationDataInstanceRef(self):
53
52
  ref_type = ArVariableInImplementationDataInstanceRef()
54
- assert(ref_type != None)
55
- assert(ref_type.getPortPrototypeRef() == None)
56
- assert(ref_type.getTargetDataPrototypeRef() == None)
53
+ assert (ref_type != None)
54
+ assert (ref_type.getPortPrototypeRef() == None)
55
+ assert (ref_type.getTargetDataPrototypeRef() == None)
57
56
 
58
57
  def test_OperationInAtomicSwcInstanceRef(self):
59
58
  with pytest.raises(NotImplementedError) as err:
60
59
  _ = OperationInAtomicSwcInstanceRef()
61
- assert(str(err.value) == "OperationInAtomicSwcInstanceRef is an abstract class.")
60
+ assert (str(err.value) ==
61
+ "OperationInAtomicSwcInstanceRef is an abstract class.")
62
62
 
63
63
  def test_POperationInAtomicSwcInstanceRef(self):
64
64
  ref_type = POperationInAtomicSwcInstanceRef()
65
- assert(isinstance(ref_type, ARObject))
66
- assert(isinstance(ref_type, AtpInstanceRef))
67
- assert(isinstance(ref_type, OperationInAtomicSwcInstanceRef))
68
- assert(isinstance(ref_type, POperationInAtomicSwcInstanceRef))
69
- assert(ref_type != None)
70
- assert(ref_type.getContextPPortRef() == None)
71
- assert(ref_type.getTargetProvidedOperationRef() == None)
65
+ assert (isinstance(ref_type, ARObject))
66
+ assert (isinstance(ref_type, AtpInstanceRef))
67
+ assert (isinstance(ref_type, OperationInAtomicSwcInstanceRef))
68
+ assert (isinstance(ref_type, POperationInAtomicSwcInstanceRef))
69
+ assert (ref_type != None)
70
+ assert (ref_type.getContextPPortRef() == None)
71
+ assert (ref_type.getTargetProvidedOperationRef() == None)
72
72
 
73
73
  def test_ROperationInAtomicSwcInstanceRef(self):
74
74
  ref_type = ROperationInAtomicSwcInstanceRef()
75
- assert(isinstance(ref_type, ARObject))
76
- assert(isinstance(ref_type, AtpInstanceRef))
77
- assert(isinstance(ref_type, OperationInAtomicSwcInstanceRef))
78
- assert(isinstance(ref_type, ROperationInAtomicSwcInstanceRef))
79
- assert(ref_type != None)
80
- assert(ref_type.getContextRPortRef() == None)
81
- assert(ref_type.getTargetRequiredOperationRef() == None)
75
+ assert (isinstance(ref_type, ARObject))
76
+ assert (isinstance(ref_type, AtpInstanceRef))
77
+ assert (isinstance(ref_type, OperationInAtomicSwcInstanceRef))
78
+ assert (isinstance(ref_type, ROperationInAtomicSwcInstanceRef))
79
+ assert (ref_type != None)
80
+ assert (ref_type.getContextRPortRef() == None)
81
+ assert (ref_type.getTargetRequiredOperationRef() == None)