]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
Simplification du test BugPyxB
authorEric Fayolle <eric.fayolle@edf.fr>
Thu, 7 Jul 2022 10:05:04 +0000 (12:05 +0200)
committerEric Fayolle <eric.fayolle@edf.fr>
Thu, 7 Jul 2022 10:05:04 +0000 (12:05 +0200)
14 files changed:
TestPyxbBugEvenSimpler/cata_ko.xsd [new symlink]
TestPyxbBugEvenSimpler/cata_ko_test_driver_1.py [new file with mode: 0755]
TestPyxbBugEvenSimpler/cata_ko_test_driver_1.xml [new symlink]
TestPyxbBugEvenSimpler/cata_ko_test_driver_1_modif.py [new file with mode: 0755]
TestPyxbBugEvenSimpler/cata_ko_test_driver_1_modif.xml [new symlink]
TestPyxbBugEvenSimpler/cata_ok.xsd [new symlink]
TestPyxbBugEvenSimpler/cata_ok_test_driver_1.py [new file with mode: 0755]
TestPyxbBugEvenSimpler/cata_ok_test_driver_1.xml [new symlink]
TestPyxbBugEvenSimpler/cata_ok_test_driver_1_modif.py [new file with mode: 0755]
TestPyxbBugEvenSimpler/cata_ok_test_driver_1_modif.xml [new symlink]
TestPyxbBugEvenSimpler/cata_test_driver_1.xml [new file with mode: 0644]
TestPyxbBugEvenSimpler/cata_test_driver_1_modified.xml [new file with mode: 0644]
TestPyxbBugEvenSimpler/ko/cata.xsd [new file with mode: 0644]
TestPyxbBugEvenSimpler/ok/cata.xsd [new file with mode: 0644]

diff --git a/TestPyxbBugEvenSimpler/cata_ko.xsd b/TestPyxbBugEvenSimpler/cata_ko.xsd
new file mode 120000 (symlink)
index 0000000..52f5fba
--- /dev/null
@@ -0,0 +1 @@
+ko/cata.xsd
\ No newline at end of file
diff --git a/TestPyxbBugEvenSimpler/cata_ko_test_driver_1.py b/TestPyxbBugEvenSimpler/cata_ko_test_driver_1.py
new file mode 100755 (executable)
index 0000000..be464b7
--- /dev/null
@@ -0,0 +1,12 @@
+#! /usr/bin/env python3
+# -*- coding:utf-8 -*-
+import sys
+
+#print(sys.argv[:])
+
+import cata_ko_driver as mdm
+import pyxb
+
+o1 = mdm.CreateFromDocument(open('cata_ko_test_driver_1.xml').read())
+print(o1.toDOM().toprettyxml())
+
diff --git a/TestPyxbBugEvenSimpler/cata_ko_test_driver_1.xml b/TestPyxbBugEvenSimpler/cata_ko_test_driver_1.xml
new file mode 120000 (symlink)
index 0000000..b77f1a0
--- /dev/null
@@ -0,0 +1 @@
+cata_test_driver_1.xml
\ No newline at end of file
diff --git a/TestPyxbBugEvenSimpler/cata_ko_test_driver_1_modif.py b/TestPyxbBugEvenSimpler/cata_ko_test_driver_1_modif.py
new file mode 100755 (executable)
index 0000000..bc01ca8
--- /dev/null
@@ -0,0 +1,12 @@
+#! /usr/bin/env python3
+# -*- coding:utf-8 -*-
+import sys
+
+#print(sys.argv[:])
+
+import cata_ko_driver as mdm
+import pyxb
+
+o1 = mdm.CreateFromDocument(open('cata_ko_test_driver_1_modif.xml').read())
+print(o1.toDOM().toprettyxml())
+
diff --git a/TestPyxbBugEvenSimpler/cata_ko_test_driver_1_modif.xml b/TestPyxbBugEvenSimpler/cata_ko_test_driver_1_modif.xml
new file mode 120000 (symlink)
index 0000000..9eb2559
--- /dev/null
@@ -0,0 +1 @@
+cata_test_driver_1_modified.xml
\ No newline at end of file
diff --git a/TestPyxbBugEvenSimpler/cata_ok.xsd b/TestPyxbBugEvenSimpler/cata_ok.xsd
new file mode 120000 (symlink)
index 0000000..e9a1d8e
--- /dev/null
@@ -0,0 +1 @@
+ok/cata.xsd
\ No newline at end of file
diff --git a/TestPyxbBugEvenSimpler/cata_ok_test_driver_1.py b/TestPyxbBugEvenSimpler/cata_ok_test_driver_1.py
new file mode 100755 (executable)
index 0000000..60f6cce
--- /dev/null
@@ -0,0 +1,12 @@
+#! /usr/bin/env python3
+# -*- coding:utf-8 -*-
+import sys
+
+#print(sys.argv[:])
+
+import cata_ok_driver as mdm
+import pyxb
+
+o1 = mdm.CreateFromDocument(open('cata_ok_test_driver_1.xml').read())
+print(o1.toDOM().toprettyxml())
+
diff --git a/TestPyxbBugEvenSimpler/cata_ok_test_driver_1.xml b/TestPyxbBugEvenSimpler/cata_ok_test_driver_1.xml
new file mode 120000 (symlink)
index 0000000..b77f1a0
--- /dev/null
@@ -0,0 +1 @@
+cata_test_driver_1.xml
\ No newline at end of file
diff --git a/TestPyxbBugEvenSimpler/cata_ok_test_driver_1_modif.py b/TestPyxbBugEvenSimpler/cata_ok_test_driver_1_modif.py
new file mode 100755 (executable)
index 0000000..1498a1a
--- /dev/null
@@ -0,0 +1,12 @@
+#! /usr/bin/env python3
+# -*- coding:utf-8 -*-
+import sys
+
+#print(sys.argv[:])
+
+import cata_ok_driver as mdm
+import pyxb
+
+o1 = mdm.CreateFromDocument(open('cata_ok_test_driver_1_modif.xml').read())
+print(o1.toDOM().toprettyxml())
+
diff --git a/TestPyxbBugEvenSimpler/cata_ok_test_driver_1_modif.xml b/TestPyxbBugEvenSimpler/cata_ok_test_driver_1_modif.xml
new file mode 120000 (symlink)
index 0000000..9eb2559
--- /dev/null
@@ -0,0 +1 @@
+cata_test_driver_1_modified.xml
\ No newline at end of file
diff --git a/TestPyxbBugEvenSimpler/cata_test_driver_1.xml b/TestPyxbBugEvenSimpler/cata_test_driver_1.xml
new file mode 100644 (file)
index 0000000..602b4f5
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<MY_NS:Root xmlns:MY_NS="http://search.a.bug.fr/logiciels/MY_NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://search.a.bug.fr/logiciels/MY_NS cata_ko.xsd">\r
+       <MY_NS:d>2</MY_NS:d>\r
+       <MY_NS:m>3.141</MY_NS:m>\r
+</MY_NS:Root>\r
diff --git a/TestPyxbBugEvenSimpler/cata_test_driver_1_modified.xml b/TestPyxbBugEvenSimpler/cata_test_driver_1_modified.xml
new file mode 100644 (file)
index 0000000..a9b710b
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<MY_NS:Root xmlns:MY_NS="http://search.a.bug.fr/logiciels/MY_NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://search.a.bug.fr/logiciels/MY_NS cata_ko.xsd">\r
+       <MY_NS:m>3.141</MY_NS:m>\r
+</MY_NS:Root>\r
diff --git a/TestPyxbBugEvenSimpler/ko/cata.xsd b/TestPyxbBugEvenSimpler/ko/cata.xsd
new file mode 100644 (file)
index 0000000..22fbee3
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://search.a.bug.fr/logiciels/MY_NS" xmlns:MY_NS="http://search.a.bug.fr/logiciels/MY_NS" targetNamespace="http://search.a.bug.fr/logiciels/MY_NS" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0">
+       <xs:simpleType name="T_l">
+               <xs:restriction base="xs:int"/>
+       </xs:simpleType>
+       <xs:simpleType name="T_d">
+               <xs:restriction base="xs:int">
+                       <xs:enumeration value="1"/>
+                       <xs:enumeration value="2"/>
+                       <xs:enumeration value="3"/>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="T_m">
+               <xs:restriction base="xs:float"/>
+       </xs:simpleType>
+       <xs:group name="T_B1_B2">
+               <xs:choice>
+                       <xs:element name="m" type="MY_NS:T_m" minOccurs="1" maxOccurs="1"/>
+                       <xs:sequence>
+                               <xs:element name="d" type="MY_NS:T_d" minOccurs="1" maxOccurs="1"/>
+                               <xs:element name="m" type="MY_NS:T_m" minOccurs="1" maxOccurs="1"/>
+                       </xs:sequence>
+               </xs:choice>
+       </xs:group>
+       <xs:element name="Root" type="MY_NS:T_Root"/>
+       <xs:complexType name="T_Root">
+               <xs:group ref="T_B1_B2" minOccurs="0"/>
+       </xs:complexType>
+</xs:schema>
diff --git a/TestPyxbBugEvenSimpler/ok/cata.xsd b/TestPyxbBugEvenSimpler/ok/cata.xsd
new file mode 100644 (file)
index 0000000..87b3126
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://search.a.bug.fr/logiciels/MY_NS" xmlns:MY_NS="http://search.a.bug.fr/logiciels/MY_NS" targetNamespace="http://search.a.bug.fr/logiciels/MY_NS" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0">
+       <xs:simpleType name="T_l">
+               <xs:restriction base="xs:int"/>
+       </xs:simpleType>
+       <xs:simpleType name="T_d">
+               <xs:restriction base="xs:int">
+                       <xs:enumeration value="1"/>
+                       <xs:enumeration value="2"/>
+                       <xs:enumeration value="3"/>
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="T_m">
+               <xs:restriction base="xs:float"/>
+       </xs:simpleType>
+       <xs:group name="T_B1_B2">
+               <xs:choice>
+                       <xs:sequence>
+                               <xs:element name="d" type="MY_NS:T_d" minOccurs="1" maxOccurs="1"/>
+                               <xs:element name="m" type="MY_NS:T_m" minOccurs="1" maxOccurs="1"/>
+                       </xs:sequence>
+                       <xs:element name="m" type="MY_NS:T_m" minOccurs="1" maxOccurs="1"/>
+               </xs:choice>
+       </xs:group>
+       <xs:element name="Root" type="MY_NS:T_Root"/>
+       <xs:complexType name="T_Root">
+               <xs:group ref="T_B1_B2" minOccurs="0"/>
+       </xs:complexType>
+</xs:schema>