1 # -*- coding: utf-8 -*-
3 from test
import support
5 class PEP3131Test(unittest
.TestCase
):
10 µ
= 2 # this is a compatibility character
12 self
.assertEquals(getattr(T
, "\xe4"), 1)
13 self
.assertEquals(getattr(T
, "\u03bc"), 2)
14 self
.assertEquals(getattr(T
, '\u87d2'), 3)
16 def test_invalid(self
):
18 from test
import badsyntax_3131
19 except SyntaxError as s
:
20 self
.assertEquals(str(s
),
21 "invalid character in identifier (badsyntax_3131.py, line 2)")
23 self
.fail("expected exception didn't occur")
26 support
.run_unittest(PEP3131Test
)
28 if __name__
=="__main__":