Back to index

python3.2  3.2.2
Classes | Functions
test.test_unicode Namespace Reference

Classes

class  UnicodeTest
class  StringModuleTest

Functions

def search_function
def test_main

Detailed Description

Test script for the Unicode implementation.

Written by Marc-Andre Lemburg (mal@lemburg.com).

(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.

Function Documentation

Definition at line 17 of file test_unicode.py.

00017 
00018 def search_function(encoding):
00019     def decode1(input, errors="strict"):
00020         return 42 # not a tuple
00021     def encode1(input, errors="strict"):
00022         return 42 # not a tuple
00023     def encode2(input, errors="strict"):
00024         return (42, 42) # no unicode
00025     def decode2(input, errors="strict"):
00026         return (42, 42) # no unicode
00027     if encoding=="test.unicode1":
00028         return (encode1, decode1, None, None)
00029     elif encoding=="test.unicode2":
00030         return (encode2, decode2, None, None)
00031     else:
00032         return None
00033 codecs.register(search_function)

Definition at line 1602 of file test_unicode.py.

01602 
01603 def test_main():
01604     support.run_unittest(__name__)