Switch to unified view
a/tests/pythonapi/simple.py | b/tests/pythonapi/simple.py | ||
---|---|---|---|
... |
... |
||
5 | ISP3 = True |
5 | ISP3 = True |
6 | else: |
6 | else: |
7 | ISP3 = False |
7 | ISP3 = False |
8 | 8 | ||
9 | def utf8string(s): |
9 | def utf8string(s): |
10 | if s is None: |
||
11 | return "None" |
||
10 | if ISP3: |
12 | if ISP3: |
11 | return s |
13 | return s |
12 | else: |
14 | else: |
13 | return s.encode('utf8') |
15 | return s.encode('utf8') |
14 | 16 |