MCPcopy Index your code
hub / github.com/python/cpython / test_isspace_invariant

Method test_isspace_invariant

Lib/test/test_str.py:752–759  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

750
751 @support.requires_resource('cpu')
752 def test_isspace_invariant(self):
753 for codepoint in range(sys.maxunicode + 1):
754 char = chr(codepoint)
755 bidirectional = unicodedata.bidirectional(char)
756 category = unicodedata.category(char)
757 self.assertEqual(char.isspace(),
758 (bidirectional in ('WS', 'B', 'S')
759 or category == 'Zs'))
760
761 def test_isalnum(self):
762 super().test_isalnum()

Callers

nothing calls this directly

Calls 2

isspaceMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected