From: Eric Fayolle Date: Wed, 11 Apr 2018 15:47:02 +0000 (+0200) Subject: Ajout de cas tests atmo.... X-Git-Tag: V8_5_0rc1~7^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f62a28c91308912e58e186b44a51ceb7420eaf44;p=tools%2Feficas.git Ajout de cas tests atmo.... --- diff --git a/Atmo/README.txt b/Atmo/README.txt index d76a5105..8d99a232 100644 --- a/Atmo/README.txt +++ b/Atmo/README.txt @@ -1,4 +1,9 @@ pyxbgen -u modele_atmo.xsd -m atmo --write-for-customization +/local/PyXB-1.2.6/scripts/pyxbgen -u modele_atmo_test1.xsd -m atmo1 --write-for-customization +/local/PyXB-1.2.6/scripts/pyxbgen -u modele_atmo_test2.xsd -m atmo2 --write-for-customization +/local/PyXB-1.2.6/scripts/pyxbgen -u modele_atmo_test3.xsd -m atmo3 --write-for-customization +/local/PyXB-1.2.6/scripts/pyxbgen -u modele_atmo_test4.xsd -m atmo4 --write-for-customization + /local/PyXB-1.2.6/scripts/pyxbgen -u modele_atmo.xsd -m atmo --write-for-customization /local/PyXB-1.2.6/scripts/pyxbgen -u model_atmo_ext.xsd -m atmo_ext --write-for-customization diff --git a/Atmo/cata-v0.xml b/Atmo/cata-v0.xml index bf1f56f0..db5781c4 100755 --- a/Atmo/cata-v0.xml +++ b/Atmo/cata-v0.xml @@ -1,5 +1,4 @@ - diff --git a/Atmo/modele_atmo_test1.py b/Atmo/modele_atmo_test1.py index b4540d3c..15f7322c 100644 --- a/Atmo/modele_atmo_test1.py +++ b/Atmo/modele_atmo_test1.py @@ -1,4 +1,4 @@ -import raw.atmo_test1 as mdm +import raw.atmo1 as mdm my_Wind_Speed=mdm.T_Wind_Speed(0) my_Value=mdm.T_Value(0) @@ -12,3 +12,15 @@ my_Mesure1=mdm.T_Mesure1(my_Value1,my_Unit1) my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure) my_Atmos=mdm.Atmos(my_Wind) +xmls=my_Atmos.toxml() +xmls=my_Atmos.toDOM().toprettyxml() + +open('modele_atmo_test1.xml', 'w').write(xmls) + +# ou +# liste=[my_Value1,my_Unit1] +# my_Mesure1=mdm.T_Mesure1(*liste) + +# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure) +# my_Atmos=mdm.Atmos(my_Wind) +# my_Atmos.toxml() diff --git a/Atmo/modele_atmo_test2.py b/Atmo/modele_atmo_test2.py new file mode 100644 index 00000000..79108459 --- /dev/null +++ b/Atmo/modele_atmo_test2.py @@ -0,0 +1,27 @@ +import raw.atmo2 as mdm + +my_Wind_Speed=mdm.T_Wind_Speed(0) +my_Value=mdm.T_Value(0) +my_Unit=mdm.T_Unit(0) +my_Mesure=mdm.T_Mesure(my_Value,my_Unit) +# my_B_enter_mesure=mdm.T_B_enter_mesure(my_Wind_Speed,my_Mesure) + +my_Wind_Speed1=mdm.T_Wind_Speed1(1) +my_Value1=mdm.T_Value1(1) +my_Unit1=mdm.T_Unit1(1) +my_Mesure1=mdm.T_Mesure1(my_Value1,my_Unit1) + +# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1) +# my_Wind.append(my_Wind_Speed) +# my_Wind.append(my_Mesure) +# ou +# my_Wind.extend([my_Wind_Speed,my_Mesure]) +# ou +my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_Wind_Speed,my_Mesure) + + +my_Atmos=mdm.Atmos(my_Wind) +xmls=my_Atmos.toxml() +xmls=my_Atmos.toDOM().toprettyxml() + +open('modele_atmo_test2.xml', 'w').write(xmls) diff --git a/Atmo/modele_atmo_test2.xsd b/Atmo/modele_atmo_test2.xsd new file mode 100755 index 00000000..eac7c63a --- /dev/null +++ b/Atmo/modele_atmo_test2.xsd @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Atmo/modele_atmo_test3.py b/Atmo/modele_atmo_test3.py new file mode 100644 index 00000000..ad37948b --- /dev/null +++ b/Atmo/modele_atmo_test3.py @@ -0,0 +1,27 @@ +import raw.atmo3 as mdm + +my_Wind_Speed=mdm.T_Wind_Speed(0) +my_Value=mdm.T_Value(0) +my_Unit=mdm.T_Unit(0) +my_Mesure=mdm.T_Mesure(my_Value,my_Unit) +#on peut instancier l'élément global directement +my_B_enter_mesure=mdm.B_enter_mesure(my_Wind_Speed,my_Mesure) +my_Wind_Speed1=mdm.T_Wind_Speed1(1) +my_Value1=mdm.T_Value1(1) +my_Unit1=mdm.T_Unit1(1) +my_Mesure1=mdm.T_Mesure1(my_Value1,my_Unit1) + +my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure) +my_Atmos=mdm.Atmos(my_Wind) +xmls=my_Atmos.toxml() +xmls=my_Atmos.toDOM().toprettyxml() + +open('modele_atmo_test3.xml', 'w').write(xmls) + +# ou +# liste=[my_Value1,my_Unit1] +# my_Mesure1=mdm.T_Mesure1(*liste) + +# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure) +# my_Atmos=mdm.Atmos(my_Wind) +# my_Atmos.toxml() diff --git a/Atmo/modele_atmo_test3.xsd b/Atmo/modele_atmo_test3.xsd new file mode 100755 index 00000000..b79cdcf2 --- /dev/null +++ b/Atmo/modele_atmo_test3.xsd @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Atmo/modele_atmo_test4.py b/Atmo/modele_atmo_test4.py new file mode 100644 index 00000000..54b99be3 --- /dev/null +++ b/Atmo/modele_atmo_test4.py @@ -0,0 +1,37 @@ +import raw.atmo4 as mdm + +my_Wind_Speed=mdm.T_Wind_Speed(0) +my_Value=mdm.T_Value(0) +my_Unit=mdm.T_Unit(0) +my_Mesure=mdm.T_Mesure(my_Value,my_Unit) +# my_B_enter_mesure=mdm.T_B_enter_mesure(my_Wind_Speed,my_Mesure) + +my_Wind_Speed1=mdm.T_Wind_Speed1(1) +my_Value1=mdm.T_Value1(1) +my_Unit1=mdm.T_Unit1(1) +my_Mesure1=mdm.T_Mesure1(my_Value1,my_Unit1) + +# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1) +# my_Wind.append(my_Wind_Speed) +# my_Wind.append(my_Mesure) +# ou +# my_Wind.extend([my_Wind_Speed,my_Mesure]) +# ou +my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_Wind_Speed,my_Mesure) + + +my_Atmos=mdm.Atmos(my_Wind) +xmls=my_Atmos.toxml() +xmls=my_Atmos.toDOM().toprettyxml() + +open('modele_atmo_test4.xml', 'w').write(xmls) + +import pyxb +class T_Wind_Speed2 (pyxb.binding.datatypes.int): + + """An atomic simple type.""" + + _ExpandedName = pyxb.namespace.ExpandedName(mdm.Namespace, u'T_Wind_Speed2') + _XSDLocation = pyxb.utils.utility.Location('', 0, 0) + _Documentation = None +mdm.Namespace.addCategoryObject('typeBinding', u'T_Wind_Speed2', T_Wind_Speed2) diff --git a/Atmo/modele_atmo_test4.xsd b/Atmo/modele_atmo_test4.xsd new file mode 100755 index 00000000..87fa0e38 --- /dev/null +++ b/Atmo/modele_atmo_test4.xsd @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +