MCPcopy Index your code
hub / github.com/clips/pattern / _test_search_image_size

Method _test_search_image_size

test/test_web.py:603–611  ·  view source on GitHub ↗
(self, api, source, license, Engine)

Source from the content-addressed store, hash-verified

601 print "pattern.web.retweets()"
602
603 def _test_search_image_size(self, api, source, license, Engine):
604 # Assert image URL's for different sizes actually exist.
605 if api == "Yahoo" and license == ("",""):
606 return
607 e = Engine(license, throttle=0.25)
608 for size in (web.TINY, web.SMALL, web.MEDIUM, web.LARGE):
609 v = e.search("cats", type=web.IMAGE, count=1, size=size, cached=False)
610 self.assertEqual(web.URL(v[0].url).exists, True)
611 print "pattern.web.%s.search(type=IMAGE, size=%s)" % (api, size.upper())
612
613 def test_yahoo_image_size(self):
614 self._test_search_image_size("Yahoo", *self.api["Yahoo"])

Callers 3

test_yahoo_image_sizeMethod · 0.95
test_bing_image_sizeMethod · 0.95

Calls 1

searchMethod · 0.45

Tested by

no test coverage detected