Example #1
0
    def setUp(self):
        try:
            self.graph = ConjunctiveGraph(store=self.store)
        except ImportError:
            raise SkipTest("Dependencies for store '%s' not available!" %
                           self.store)
        if self.store == "MySQL":
            from mysql import configString
            from rdflib.store.MySQL import MySQL
            path = configString
            MySQL().destroy(path)
        else:
            self.tmppath = mkdtemp()
        self.graph.open(self.tmppath, create=True)
        self.michel = URIRef(u'michel')
        self.tarek = URIRef(u'tarek')
        self.bob = URIRef(u'bob')
        self.likes = URIRef(u'likes')
        self.hates = URIRef(u'hates')
        self.pizza = URIRef(u'pizza')
        self.cheese = URIRef(u'cheese')

        self.c1 = URIRef(u'context-1')
        self.c2 = URIRef(u'context-2')

        # delete the graph for each test!
        self.graph.remove((None, None, None))
Example #2
0
 def setUp(self):
     self.gcold = gc.isenabled()
     gc.collect()
     gc.disable()
     self.graph = Graph(store=self.store)
     if self.store == "MySQL":
         # from test.mysql import configString
         from rdflib.store.MySQL import MySQL
         path = self.configString
         MySQL().destroy(path)
     else:
         self.tmppath = mkdtemp()
     self.graph.open(self.tmppath, create=True)
     self.input = input = Graph()
     input.parse("http://eikeon.com")
Example #3
0
    def setUp(self):
        self.graph = ConjunctiveGraph(store=self.store)
        if self.store == "MySQL":
            from mysql import configString
            from rdflib.store.MySQL import MySQL
            path = configString
            MySQL().destroy(path)
        else:
            path = a_tmp_dir = mkdtemp()
        self.graph.open(path, create=True)
        self.michel = URIRef(u'michel')
        self.tarek = URIRef(u'tarek')
        self.bob = URIRef(u'bob')
        self.likes = URIRef(u'likes')
        self.hates = URIRef(u'hates')
        self.pizza = URIRef(u'pizza')
        self.cheese = URIRef(u'cheese')

        self.c1 = URIRef(u'context-1')
        self.c2 = URIRef(u'context-2')

        # delete the graph for each test!
        self.graph.remove((None, None, None))
Example #4
0
 def __init__(self, identifier=None, configuration=None,
              delimited_directory='delimited_dumps',
              reuseExistingFiles=False):
     MySQL.__init__(self, identifier, configuration, debug=True,
                    engine="ENGINE=MyISAM")
     Loader.__init__(self, delimited_directory, reuseExistingFiles)