Pass a unicode string and get it back.
(self)
| 18 | |
| 19 | class TestChar(Testing.vtkTest): |
| 20 | def testUnicode(self): |
| 21 | """Pass a unicode string and get it back. |
| 22 | """ |
| 23 | a = vtkCharArray() |
| 24 | a.InsertNextValue('\0') |
| 25 | a.InsertNextValue('%') |
| 26 | a.InsertNextValue('\u00b5') # MICRON |
| 27 | a.InsertNextValue('\u00d7') # MULTIPLICATION SIGN |
| 28 | c = a.GetValue(0) |
| 29 | self.assertEqual(c, '\0') |
| 30 | c = a.GetValue(1) |
| 31 | self.assertEqual(c, '%') |
| 32 | c = a.GetValue(2) |
| 33 | self.assertEqual(c, '\u00b5') |
| 34 | c = a.GetValue(3) |
| 35 | self.assertEqual(c, '\u00d7') |
| 36 | |
| 37 | def testBytes(self): |
| 38 | """Pass a bytes object, get back a unicode object |
nothing calls this directly
no test coverage detected