def testDigg(self): digg_sample_xml = sample_xml_content('digg_sample.xml') filtered_text = feeder.getFeeder('Digg').filter(feedparser.parse(digg_sample_xml)) good_words = self.feeder.good_words(filtered_text) self.assertEqual(set(good_words), set([u'town', u'search', u'made', u'mythical', u'that', u'writer', u'returns', u'beast', u'state', u'jersey', u'native']))
def testSlashdot(self): slashdot_sample_xml = sample_xml_content('slashdot_sample.xml') filtered_text = feeder.getFeeder('Slashdot').filter(feedparser.parse(slashdot_sample_xml)) good_words = self.feeder.good_words(filtered_text) self.assertEqual(set(good_words), set([u'attorney', u'alleging', u'violation', u'agreed', u'some', u'general', u'have', u'settlement', u'corporation', u'there', u'only', u'state', u'does', u'ever', u'complaint', u'full', u'that', u'terminate', u'company', u'million', u'allegations', u'includes', u'most', u'york', u'filed', u'press', u'november', u'lawsuit', u'payment', u'incurred', u'deny', u'intel', u'antitrust', u'require', u'official', u'cover', u'admit', u'costs', u'changes', u'laws']))
def testDigg(self): digg_sample_xml = sample_xml_content('digg_sample.xml') filtered_text = feeder.getFeeder('Digg').filter( feedparser.parse(digg_sample_xml)) good_words = self.feeder.good_words(filtered_text) self.assertEqual( set(good_words), set([ u'town', u'search', u'made', u'mythical', u'that', u'writer', u'returns', u'beast', u'state', u'jersey', u'native' ]))
def testSlashdot(self): slashdot_sample_xml = sample_xml_content('slashdot_sample.xml') filtered_text = feeder.getFeeder('Slashdot').filter( feedparser.parse(slashdot_sample_xml)) good_words = self.feeder.good_words(filtered_text) self.assertEqual( set(good_words), set([ u'attorney', u'alleging', u'violation', u'agreed', u'some', u'general', u'have', u'settlement', u'corporation', u'there', u'only', u'state', u'does', u'ever', u'complaint', u'full', u'that', u'terminate', u'company', u'million', u'allegations', u'includes', u'most', u'york', u'filed', u'press', u'november', u'lawsuit', u'payment', u'incurred', u'deny', u'intel', u'antitrust', u'require', u'official', u'cover', u'admit', u'costs', u'changes', u'laws' ]))
def __init__(self, screen): from scene import LoadingScene, PlatformingScene loading_scene = LoadingScene(screen) loading_scene.draw() pygame.display.update() self.scene = PlatformingScene(screen) self.player = self.scene.player self.spawners = [getOpponent(opp_name) for opp_name in Options.selected_opponents] feed_sources = [getFeeder(feed_name) for feed_name in Options.selected_feeds] word_list = [word for feeder in feed_sources for word in feeder.words] self.words = WordMaker(word_list) self.free_movement = False self.direction = 'r' # What direction are we moving in self.spawncount = 0 # Frame tick counter for spawn event self.jumpsoon = False # Has a jump been scheduled by the player? self.selected_platform = None # What platform are we scheduled to jump to
def setUp(self): self.feeder = feeder.getFeeder('Google')