def testProfile(self):
        d = {}

        d.update(cimread(ASSET_FILE, assetMap, nsURICIM15))
        d.update(cimread(CONN_FILE, connMap, nsURICIM15))
        d.update(cimread(EQUIP_FILE, equipMap, nsURICIM15))
        d.update(cimread(GEO_FILE, geoMap, nsURICIM15))

        self.assertEqual(len(d), 5894)
Exemple #2
0
    def testProfile(self):
        d = {}

        d.update(cimread(ASSET_FILE, assetMap, nsURICIM15))
        d.update(cimread(CONN_FILE, connMap, nsURICIM15))
        d.update(cimread(EQUIP_FILE, equipMap, nsURICIM15))
        d.update(cimread(GEO_FILE, geoMap, nsURICIM15))

        self.assertEqual(len(d), 5893)
Exemple #3
0
    def testProfile(self):
        ''' This test needs to be documented
        What is the comparison with 5893? '''
        d = {}

        d.update(cimread(EQUIP_FILE, assetMap, nsURICIM14))
        d.update(cimread(TOPO_FIlE, connMap, nsURICIM14))
        d.update(cimread(STATEV_FILE, equipMap, nsURICIM14))

        self.assertEqual(len(d), 2303)
Exemple #4
0
    def testSerialise(self):
        """Test CIM RDF/XML serialisation.
        """
        d = cimread(RDFXML_FILE)

        output = StringIO()

        cimwrite(d, output)

        output.seek(0)
        dd = cimread(output)
        output.close()

        self.assertEqual(len(dd), 5894)
    def testSerialise(self):
        """Test CIM RDF/XML serialisation.
        """
        d = cimread(RDFXML_FILE)

        output = StringIO.StringIO()

        cimwrite(d, output)

        output.seek(0)
        dd = cimread(output)
        output.close()

        self.assertEqual(len(dd), 5894)
Exemple #6
0
from PyCIM import cimread

d = cimread('220-kV-Netz-7Knoten-komplett_Rootnet_Area 1_EQ_V1.xml')
print(type(d))

for key in d.keys():
    print(key, " - ", d[key].UUID)
    d[key].UUID = "5"
Exemple #7
0
 def test_cim_reads_are_independent(self):
     cimread(ASSET_FILE, assetMap, nsURICIM15)
     sio = io.StringIO(EMPTY_CIM)
     empty_cim_dict = cimread(sio)
     self.assertEqual(empty_cim_dict, {})
Exemple #8
0
    def testCombined(self):
        """Test CIM RDF/XML parsing.
        """
        d = cimread(RDFXML_FILE)

        self.assertEqual(len(d), 5894)
Exemple #9
0
'''
Created on 14 jan 2015

Intention of this class, use PyCIM to read CIM model and create the corresponding Modelica class / model

@author: fragom
'''
import logging

logging.basicConfig(level=logging.INFO)

from PyCIM import cimread

d = cimread(
    'C:/Users/fragom/PhD_CIM/CIMv16/SmarTSLab/Components/ACLineSegment.xml')

if __name__ == '__main__':
    pass
Exemple #10
0
    def testCombined(self):
        """Test CIM RDF/XML parsing.
        """
        d = cimread(RDFXML_FILE)

        self.assertEqual(len(d), 5894)
Exemple #11
0
import logging
from PyCIM import cimread

logging.basicConfig(level=logging.INFO)
d = cimread('CIMsamples/cim14/ABB40busModified.xml')

pass