

from rdflib.graph import ConjunctiveGraph
import unittest

class TestTrixParse(unittest.TestCase):

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def testAperture(self): 

        g=ConjunctiveGraph()

        g.parse("test/trix/aperture.trix",format="trix")
        c=list(g.contexts())

        #print list(g.contexts())
        t=sum(map(len, g.contexts()))

        self.assertEquals(t,24)
        self.assertEquals(len(c),4)
        
        #print "Parsed %d triples"%t

    def testSpec(self): 

        g=ConjunctiveGraph()
        
        g.parse("test/trix/nokia_example.trix",format="trix")
        
        #print "Parsed %d triples"%len(g)
        



if __name__=='__main__':
    unittest.main()
                          



from rdflib.graph import ConjunctiveGraph
import unittest

class TestTrixParse(unittest.TestCase):

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def testAperture(self): 

        g=ConjunctiveGraph()

        g.parse("test/trix/aperture.trix",format="trix")
        c=list(g.contexts())

        #print list(g.contexts())
        t=sum(map(len, g.contexts()))

        self.assertEquals(t,24)
        self.assertEquals(len(c),4)
        
        #print "Parsed %d triples"%t

    def testSpec(self): 

        g=ConjunctiveGraph()
        
        g.parse("test/trix/nokia_example.trix",format="trix")
        
        #print "Parsed %d triples"%len(g)
        
    def testNG4j(self): 

        g=ConjunctiveGraph()
        
        g.parse("test/trix/ng4jtest.trix",format="trix")
        
        #print "Parsed %d triples"%len(g)

import platform
if platform.system() == 'Java':
    from nose import SkipTest
    raise SkipTest('Jython issues - "JavaSAXParser" object has no attribute "start_namespace_decl"')

if __name__=='__main__':
    unittest.main()
                          

Disable trix parser tests with Jython
Disable trix parser tests with Jython

  
  
  from rdflib.graph import ConjunctiveGraph
  import unittest
  
  class TestTrixParse(unittest.TestCase):
  
      def setUp(self):
          pass
  
      def tearDown(self):
          pass
  
      def testAperture(self): 
  
          g=ConjunctiveGraph()
  
          g.parse("test/trix/aperture.trix",format="trix")
          c=list(g.contexts())
  
          #print list(g.contexts())
          t=sum(map(len, g.contexts()))
  
          self.assertEquals(t,24)
          self.assertEquals(len(c),4)
          
          #print "Parsed %d triples"%t
  
      def testSpec(self): 
  
          g=ConjunctiveGraph()
          
          g.parse("test/trix/nokia_example.trix",format="trix")
          
          #print "Parsed %d triples"%len(g)
          
+     def testNG4j(self): 
  
+         g=ConjunctiveGraph()
+         
+         g.parse("test/trix/ng4jtest.trix",format="trix")
+         
+         #print "Parsed %d triples"%len(g)
  
+ import platform
+ if platform.system() == 'Java':
+     from nose import SkipTest
+     raise SkipTest('Jython issues - "JavaSAXParser" object has no attribute "start_namespace_decl"')
  
  if __name__=='__main__':
      unittest.main()
                            
  
Disable trix parser tests with Jython
## Code Before:


from rdflib.graph import ConjunctiveGraph
import unittest

class TestTrixParse(unittest.TestCase):

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def testAperture(self): 

        g=ConjunctiveGraph()

        g.parse("test/trix/aperture.trix",format="trix")
        c=list(g.contexts())

        #print list(g.contexts())
        t=sum(map(len, g.contexts()))

        self.assertEquals(t,24)
        self.assertEquals(len(c),4)
        
        #print "Parsed %d triples"%t

    def testSpec(self): 

        g=ConjunctiveGraph()
        
        g.parse("test/trix/nokia_example.trix",format="trix")
        
        #print "Parsed %d triples"%len(g)
        



if __name__=='__main__':
    unittest.main()
                          

## Instruction:
Disable trix parser tests with Jython
## Code After:


from rdflib.graph import ConjunctiveGraph
import unittest

class TestTrixParse(unittest.TestCase):

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def testAperture(self): 

        g=ConjunctiveGraph()

        g.parse("test/trix/aperture.trix",format="trix")
        c=list(g.contexts())

        #print list(g.contexts())
        t=sum(map(len, g.contexts()))

        self.assertEquals(t,24)
        self.assertEquals(len(c),4)
        
        #print "Parsed %d triples"%t

    def testSpec(self): 

        g=ConjunctiveGraph()
        
        g.parse("test/trix/nokia_example.trix",format="trix")
        
        #print "Parsed %d triples"%len(g)
        
    def testNG4j(self): 

        g=ConjunctiveGraph()
        
        g.parse("test/trix/ng4jtest.trix",format="trix")
        
        #print "Parsed %d triples"%len(g)

import platform
if platform.system() == 'Java':
    from nose import SkipTest
    raise SkipTest('Jython issues - "JavaSAXParser" object has no attribute "start_namespace_decl"')

if __name__=='__main__':
    unittest.main()
                          
