Back to index

python3.2  3.2.2
Public Member Functions
test.test_getargs2.Bytes_TestCase Class Reference

List of all members.

Public Member Functions

def test_s
def test_s_star
def test_s_hash
def test_z
def test_z_star
def test_z_hash
def test_y
def test_y_star
def test_y_hash
def test_w_star

Detailed Description

Definition at line 296 of file test_getargs2.py.


Member Function Documentation

Definition at line 297 of file test_getargs2.py.

00297 
00298     def test_s(self):
00299         from _testcapi import getargs_s
00300         self.assertEqual(getargs_s('abc\xe9'), b'abc\xc3\xa9')
00301         self.assertRaises(TypeError, getargs_s, 'nul:\0')
00302         self.assertRaises(TypeError, getargs_s, b'bytes')
00303         self.assertRaises(TypeError, getargs_s, bytearray(b'bytearray'))
00304         self.assertRaises(TypeError, getargs_s, memoryview(b'memoryview'))
00305         self.assertRaises(TypeError, getargs_s, None)

Here is the call graph for this function:

Definition at line 315 of file test_getargs2.py.

00315 
00316     def test_s_hash(self):
00317         from _testcapi import getargs_s_hash
00318         self.assertEqual(getargs_s_hash('abc\xe9'), b'abc\xc3\xa9')
00319         self.assertEqual(getargs_s_hash('nul:\0'), b'nul:\0')
00320         self.assertEqual(getargs_s_hash(b'bytes'), b'bytes')
00321         self.assertRaises(TypeError, getargs_s_hash, bytearray(b'bytearray'))
00322         self.assertRaises(TypeError, getargs_s_hash, memoryview(b'memoryview'))
00323         self.assertRaises(TypeError, getargs_s_hash, None)

Here is the call graph for this function:

Definition at line 306 of file test_getargs2.py.

00306 
00307     def test_s_star(self):
00308         from _testcapi import getargs_s_star
00309         self.assertEqual(getargs_s_star('abc\xe9'), b'abc\xc3\xa9')
00310         self.assertEqual(getargs_s_star('nul:\0'), b'nul:\0')
00311         self.assertEqual(getargs_s_star(b'bytes'), b'bytes')
00312         self.assertEqual(getargs_s_star(bytearray(b'bytearray')), b'bytearray')
00313         self.assertEqual(getargs_s_star(memoryview(b'memoryview')), b'memoryview')
00314         self.assertRaises(TypeError, getargs_s_star, None)

Here is the call graph for this function:

Definition at line 378 of file test_getargs2.py.

00378 
00379     def test_w_star(self):
00380         # getargs_w_star() modifies first and last byte
00381         from _testcapi import getargs_w_star
00382         self.assertRaises(TypeError, getargs_w_star, 'abc\xe9')
00383         self.assertRaises(TypeError, getargs_w_star, b'bytes')
00384         self.assertRaises(TypeError, getargs_w_star, b'nul:\0')
00385         self.assertRaises(TypeError, getargs_w_star, memoryview(b'bytes'))
00386         self.assertEqual(getargs_w_star(bytearray(b'bytearray')), b'[ytearra]')
00387         self.assertEqual(getargs_w_star(memoryview(bytearray(b'memoryview'))),
00388                          b'[emoryvie]')
00389         self.assertRaises(TypeError, getargs_w_star, None)
00390 

Here is the call graph for this function:

Definition at line 351 of file test_getargs2.py.

00351 
00352     def test_y(self):
00353         from _testcapi import getargs_y
00354         self.assertRaises(TypeError, getargs_y, 'abc\xe9')
00355         self.assertEqual(getargs_y(b'bytes'), b'bytes')
00356         self.assertRaises(TypeError, getargs_y, b'nul:\0')
00357         self.assertRaises(TypeError, getargs_y, bytearray(b'bytearray'))
00358         self.assertRaises(TypeError, getargs_y, memoryview(b'memoryview'))
00359         self.assertRaises(TypeError, getargs_y, None)

Here is the call graph for this function:

Definition at line 369 of file test_getargs2.py.

00369 
00370     def test_y_hash(self):
00371         from _testcapi import getargs_y_hash
00372         self.assertRaises(TypeError, getargs_y_hash, 'abc\xe9')
00373         self.assertEqual(getargs_y_hash(b'bytes'), b'bytes')
00374         self.assertEqual(getargs_y_hash(b'nul:\0'), b'nul:\0')
00375         self.assertRaises(TypeError, getargs_y_hash, bytearray(b'bytearray'))
00376         self.assertRaises(TypeError, getargs_y_hash, memoryview(b'memoryview'))
00377         self.assertRaises(TypeError, getargs_y_hash, None)

Here is the call graph for this function:

Definition at line 360 of file test_getargs2.py.

00360 
00361     def test_y_star(self):
00362         from _testcapi import getargs_y_star
00363         self.assertRaises(TypeError, getargs_y_star, 'abc\xe9')
00364         self.assertEqual(getargs_y_star(b'bytes'), b'bytes')
00365         self.assertEqual(getargs_y_star(b'nul:\0'), b'nul:\0')
00366         self.assertEqual(getargs_y_star(bytearray(b'bytearray')), b'bytearray')
00367         self.assertEqual(getargs_y_star(memoryview(b'memoryview')), b'memoryview')
00368         self.assertRaises(TypeError, getargs_y_star, None)

Here is the call graph for this function:

Definition at line 324 of file test_getargs2.py.

00324 
00325     def test_z(self):
00326         from _testcapi import getargs_z
00327         self.assertEqual(getargs_z('abc\xe9'), b'abc\xc3\xa9')
00328         self.assertRaises(TypeError, getargs_z, 'nul:\0')
00329         self.assertRaises(TypeError, getargs_z, b'bytes')
00330         self.assertRaises(TypeError, getargs_z, bytearray(b'bytearray'))
00331         self.assertRaises(TypeError, getargs_z, memoryview(b'memoryview'))
00332         self.assertIsNone(getargs_z(None))

Here is the call graph for this function:

Definition at line 342 of file test_getargs2.py.

00342 
00343     def test_z_hash(self):
00344         from _testcapi import getargs_z_hash
00345         self.assertEqual(getargs_z_hash('abc\xe9'), b'abc\xc3\xa9')
00346         self.assertEqual(getargs_z_hash('nul:\0'), b'nul:\0')
00347         self.assertEqual(getargs_z_hash(b'bytes'), b'bytes')
00348         self.assertRaises(TypeError, getargs_z_hash, bytearray(b'bytearray'))
00349         self.assertRaises(TypeError, getargs_z_hash, memoryview(b'memoryview'))
00350         self.assertIsNone(getargs_z_hash(None))

Here is the call graph for this function:

Definition at line 333 of file test_getargs2.py.

00333 
00334     def test_z_star(self):
00335         from _testcapi import getargs_z_star
00336         self.assertEqual(getargs_z_star('abc\xe9'), b'abc\xc3\xa9')
00337         self.assertEqual(getargs_z_star('nul:\0'), b'nul:\0')
00338         self.assertEqual(getargs_z_star(b'bytes'), b'bytes')
00339         self.assertEqual(getargs_z_star(bytearray(b'bytearray')), b'bytearray')
00340         self.assertEqual(getargs_z_star(memoryview(b'memoryview')), b'memoryview')
00341         self.assertIsNone(getargs_z_star(None))

Here is the call graph for this function:


The documentation for this class was generated from the following file: