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

Method test_correlation

test/test_web.py:877–885  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

875 print "pattern.web.locale.geocode()"
876
877 def test_correlation(self):
878 # Test the correlation between locale.LANGUAGE_REGION and locale.GEOCODE.
879 # It should increase as new languages and locations are added.
880 i = 0
881 n = len(web.locale.GEOCODE)
882 for city, (latitude, longitude, language, region) in web.locale.GEOCODE.items():
883 if web.locale.encode_region(region) is not None:
884 i += 1
885 self.assertTrue(float(i) / n > 0.60)
886
887#---------------------------------------------------------------------------------------------------
888# You need to define a username, password and mailbox to test on.

Callers

nothing calls this directly

Calls 2

lenFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected