
import sys

if sys.version_info < (3,):  # pragma: no cover
    from urllib import quote as url_quote
    to_bytes = lambda s: s.encode('utf-8') if isinstance(s, unicode) else s
else:  # pragma: no cover
    from urllib.parse import quote as url_quote
    to_bytes = lambda s: bytes(s, 'utf-8') if isinstance(s, str) else s

__all__ = ['to_bytes', 'url_quote']


import sys

try:
    unicode
except NameError:
    unicode = None

if sys.version_info < (3,):  # pragma: no cover
    from urllib import quote as url_quote
    to_bytes = lambda s: s.encode('utf-8') if isinstance(s, unicode) else s
else:  # pragma: no cover
    from urllib.parse import quote as url_quote
    to_bytes = lambda s: bytes(s, 'utf-8') if isinstance(s, str) else s

__all__ = ['to_bytes', 'url_quote']

Fix broken test on Python 3.3
Fix broken test on Python 3.3

  
  import sys
+ 
+ try:
+     unicode
+ except NameError:
+     unicode = None
  
  if sys.version_info < (3,):  # pragma: no cover
      from urllib import quote as url_quote
      to_bytes = lambda s: s.encode('utf-8') if isinstance(s, unicode) else s
  else:  # pragma: no cover
      from urllib.parse import quote as url_quote
      to_bytes = lambda s: bytes(s, 'utf-8') if isinstance(s, str) else s
  
  __all__ = ['to_bytes', 'url_quote']
  
Fix broken test on Python 3.3
## Code Before:

import sys

if sys.version_info < (3,):  # pragma: no cover
    from urllib import quote as url_quote
    to_bytes = lambda s: s.encode('utf-8') if isinstance(s, unicode) else s
else:  # pragma: no cover
    from urllib.parse import quote as url_quote
    to_bytes = lambda s: bytes(s, 'utf-8') if isinstance(s, str) else s

__all__ = ['to_bytes', 'url_quote']

## Instruction:
Fix broken test on Python 3.3
## Code After:

import sys

try:
    unicode
except NameError:
    unicode = None

if sys.version_info < (3,):  # pragma: no cover
    from urllib import quote as url_quote
    to_bytes = lambda s: s.encode('utf-8') if isinstance(s, unicode) else s
else:  # pragma: no cover
    from urllib.parse import quote as url_quote
    to_bytes = lambda s: bytes(s, 'utf-8') if isinstance(s, str) else s

__all__ = ['to_bytes', 'url_quote']
