Back to index

python3.2  3.2.2
Public Member Functions
test.test_pep3131.PEP3131Test Class Reference

List of all members.

Public Member Functions

def test_valid
def test_non_bmp_normalized
def test_invalid

Detailed Description

Definition at line 5 of file test_pep3131.py.


Member Function Documentation

Definition at line 27 of file test_pep3131.py.

00027 
00028     def test_invalid(self):
00029         try:
00030             from test import badsyntax_3131
00031         except SyntaxError as s:
00032             self.assertEqual(str(s),
00033               "invalid character in identifier (badsyntax_3131.py, line 2)")
00034         else:
00035             self.fail("expected exception didn't occur")

Here is the call graph for this function:

Definition at line 18 of file test_pep3131.py.

00018 
00019     def test_non_bmp_normalized(self):
00020         ๐”˜๐”ซ๐”ฆ๐” ๐”ฌ๐”ก๐”ข = 1
00021         # On wide builds, this is normalized, but on narrow ones it is not. See
00022         # #12746.
00023         try:
00024             self.assertIn("๐”˜๐”ซ๐”ฆ๐” ๐”ฌ๐”ก๐”ข", dir())
00025         except AssertionError:
00026             raise unittest.case._ExpectedFailure(sys.exc_info())

Here is the call graph for this function:

Definition at line 7 of file test_pep3131.py.

00007 
00008     def test_valid(self):
00009         class T:
00010             รค = 1
00011             ยต = 2 # this is a compatibility character
00012             ่Ÿ’ = 3
00013             x๓ „€ = 4
00014         self.assertEqual(getattr(T, "\xe4"), 1)
00015         self.assertEqual(getattr(T, "\u03bc"), 2)
00016         self.assertEqual(getattr(T, '\u87d2'), 3)
00017         self.assertEqual(getattr(T, 'x\U000E0100'), 4)

Here is the call graph for this function:


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