Back to index

python3.2  3.2.2
Public Member Functions
test.test_pep3120.PEP3120Test Class Reference

List of all members.

Public Member Functions

def test_pep3120
def test_badsyntax

Detailed Description

Definition at line 6 of file test_pep3120.py.


Member Function Documentation

Definition at line 18 of file test_pep3120.py.

00018 
00019     def test_badsyntax(self):
00020         try:
00021             import test.badsyntax_pep3120
00022         except SyntaxError as msg:
00023             msg = str(msg)
00024             self.assertTrue('UTF-8' in msg or 'utf8' in msg)
00025         else:
00026             self.fail("expected exception didn't occur")
00027 

Here is the call graph for this function:

Definition at line 8 of file test_pep3120.py.

00008 
00009     def test_pep3120(self):
00010         self.assertEqual(
00011             "Питон".encode("utf-8"),
00012             b'\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd'
00013         )
00014         self.assertEqual(
00015             "\П".encode("utf-8"),
00016             b'\\\xd0\x9f'
00017         )

Here is the call graph for this function:


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