diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-02 12:55:29 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-02 12:55:29 -0500 |
commit | 69c864c159b9f960e8881f5a60d20453ad17a30f (patch) | |
tree | ef3bf486bf78a4151d6708e43a23b523974dd4f3 /setuptools/tests/test_test.py | |
parent | adda5ac7b25a17843749f054e48bc36de4c54b72 (diff) | |
download | external_python_setuptools-69c864c159b9f960e8881f5a60d20453ad17a30f.tar.gz external_python_setuptools-69c864c159b9f960e8881f5a60d20453ad17a30f.tar.bz2 external_python_setuptools-69c864c159b9f960e8881f5a60d20453ad17a30f.zip |
Use unicode literals to define files as text, and encode specifically when saving files.
Diffstat (limited to 'setuptools/tests/test_test.py')
-rw-r--r-- | setuptools/tests/test_test.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index f2b444f7..4430e6ea 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -1,13 +1,12 @@ # -*- coding: UTF-8 -*- -"""develop tests -""" +from __future__ import unicode_literals + import os import site import pytest -from setuptools.compat import PY2 from setuptools.command.test import test from setuptools.dist import Distribution @@ -34,11 +33,6 @@ NS_INIT = DALS(""" __path__ = extend_path(__path__, __name__) """) -# Make sure this is Latin-1 binary, before writing: -if PY2: - NS_INIT = NS_INIT.decode('UTF-8') -NS_INIT = NS_INIT.encode('Latin-1') - TEST_PY = DALS(""" import unittest @@ -60,7 +54,7 @@ def sample_test(tmpdir_cwd): # name/__init__.py with open('name/__init__.py', 'wb') as f: - f.write(NS_INIT) + f.write(NS_INIT.encode('Latin-1')) # name/space/__init__.py with open('name/space/__init__.py', 'wt') as f: |