Skip to content

Commit b01e50b

Browse files
committed
Python 2 safe unicode in source
1 parent 41bb5a7 commit b01e50b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/integration_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
23
#
34
#
45
# Copyright 2016 Confluent Inc.
@@ -66,7 +67,7 @@
6667
produce_headers = [('foo1', 'bar'),
6768
('foo1', 'bar2'),
6869
('foo2', b'1'),
69-
('Jämtland', 'Härjedalen'), # automatically utf-8 encoded
70+
(u'Jämtland', u'Härjedalen'), # automatically utf-8 encoded
7071
('nullheader', None),
7172
('empty', ''),
7273
('foobin', struct.pack('hhl', 10, 20, 30))]
@@ -75,7 +76,7 @@
7576
expected_headers = [('foo1', b'bar'),
7677
('foo1', b'bar2'),
7778
('foo2', b'1'),
78-
('Jämtland', b'H\xc3\xa4rjedalen'), # not automatically utf-8 decoded
79+
(u'Jämtland', b'H\xc3\xa4rjedalen'), # not automatically utf-8 decoded
7980
('nullheader', None),
8081
('empty', b''),
8182
('foobin', struct.pack('hhl', 10, 20, 30))]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy