Beispiel #1
0
 def test_simplest_xml(self):
     p = pxml.Pipeline()
     p.source = pxml.Reader('foo')
     xml = p.xml()
     self.assertEqual(xml.getroot().attrib['version'], version.as_string())
     self.assertEqual(
         xml.find('Reader').attrib['type'], 'drivers.foo.reader')
Beispiel #2
0
Datei: test.py Projekt: strk/PDAL
 def test_reader_source_error(self):
     reader = pxml.Reader('foo')
     otherreader = pxml.Reader('bar')
     self.assertRaises(ValueError, setattr, reader, 'source', otherreader)
Beispiel #3
0
Datei: test.py Projekt: strk/PDAL
 def test_multifilter_source(self):
     mfilter = pxml.MultiFilter('multi')
     mfilter.source = [pxml.Reader('foo'), pxml.Reader('bar')]
     xml = mfilter.xml()
     self.assertEqual(len(xml.findall('Reader')), 2)
Beispiel #4
0
Datei: test.py Projekt: strk/PDAL
 def test_writer_source(self):
     writer = pxml.Writer('foo')
     writer.source = pxml.Reader('bar')
     xml = writer.xml()
     self.assert_(xml.find('Reader') is not None)