root/bbox/t/01_parse.t

Revision 435, 0.6 kB (checked in by zool, 3 years ago)

trying to use find_statements within a long statement stream caused terrible lag. i remembered RDF.Model has a contains_statement method. it works.

Line 
1 import unittest
2 import feedparser
3 from bbox import BBox
4
5 class FeedTestCase(unittest.TestCase):
6     def __init__(self,*args):
7         unittest.TestCase.__init__(self, *args)
8
9     def test_01_parse_rss(self):
10         fh = open('geo.rss')
11         xml = fh.read()
12         feed = feedparser.parse(xml)
13         print "read file as string"
14
15     def test_02_bbox_parse_rss(self):
16         bbox = BBox()
17         bbox.read_rss('file:t/geo.rss')
18         print "read local rss file"
19
20     def test_03_bbox_parse_rdf(self):
21         print "reading remote"
22         bbox = BBox()
23         bbox.read_rdf('http://frot.org/foaf.rdf')
24         print "read remote rdf file"
25
26 if __name__ == '__main__':
27     unittest.main()
28
Note: See TracBrowser for help on using the browser.