MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Profiles / TestStringMethods

Class TestStringMethods

scripts/tests/test_util.py:24–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22import unittest
23
24class TestStringMethods(unittest.TestCase):
25
26 def test_upper(self):
27 self.assertEqual('foo'.upper(), 'FOO')
28
29 def test_isupper(self):
30 self.assertTrue('FOO'.isupper())
31 self.assertFalse('Foo'.isupper())
32
33 def test_split(self):
34 s = 'hello world'
35 self.assertEqual(s.split(), ['hello', 'world'])
36 # check that s.split fails when the separator is not a string
37 with self.assertRaises(TypeError):
38 s.split(2)
39
40if __name__ == '__main__':
41 unittest.main()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected