def test_spot_check_types(self): # Each char should match one, and precisely one, category random.seed(0) for i in range(1000): o = random.randint(0, 65535) c = unichr(o) if o > 0xd800 and o <= 0xdfff and not uni.Cs: continue # Bah, Jython. print(hex(o)) cats = self._cats_that_match(c) self.assertEqual(len(cats), 1, "%d (%s): %s" % (o, c, cats))