diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-09-18 10:01:46 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-09-18 10:01:46 -0400 |
commit | a7cac0e348ab9be0d56a390e87ea2ab74c69a12a (patch) | |
tree | 6592bb951e3c34098f0b8e03980bb99b185adfa3 /setuptools/tests/test_sandbox.py | |
parent | 2b3d8ead29f777fe3e1c6d26c7d110cbc554c721 (diff) | |
download | external_python_setuptools-a7cac0e348ab9be0d56a390e87ea2ab74c69a12a.tar.gz external_python_setuptools-a7cac0e348ab9be0d56a390e87ea2ab74c69a12a.tar.bz2 external_python_setuptools-a7cac0e348ab9be0d56a390e87ea2ab74c69a12a.zip |
Adding test capturing Distribute #349
--HG--
extra : amend_source : 2f401317ae94e6291ae91f8da75173781bc4c48c
Diffstat (limited to 'setuptools/tests/test_sandbox.py')
-rw-r--r-- | setuptools/tests/test_sandbox.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 1609ee86..3dad1376 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -5,7 +5,10 @@ import os import shutil import unittest import tempfile +import types +import pkg_resources +import setuptools.sandbox from setuptools.sandbox import DirectorySandbox, SandboxViolation def has_win32com(): @@ -62,5 +65,15 @@ class TestSandbox(unittest.TestCase): finally: if os.path.exists(target): os.remove(target) + def test_setup_py_with_BOM(self): + """ + It should be possible to execute a setup.py with a Byte Order Mark + """ + target = pkg_resources.resource_filename(__name__, + 'script-with-bom.py') + namespace = types.ModuleType('namespace') + setuptools.sandbox.execfile(target, vars(namespace)) + assert namespace.result == 'passed' + if __name__ == '__main__': unittest.main() |