diff options
| author | Éric Araujo <merwok@netwok.org> | 2011-11-07 18:11:12 +0100 |
|---|---|---|
| committer | Éric Araujo <merwok@netwok.org> | 2011-11-07 18:11:12 +0100 |
| commit | b1c6f59d7100aa34a1ea39eb828f392fa0988ea6 (patch) | |
| tree | b795d4c5aeca0eb8bd24ff284b94333ad21a49be /Lib/packaging/tests/test_command_build_py.py | |
| parent | e2618f34be2deb65799ccf073933cd61b443efd4 (diff) | |
| parent | 2a7cc5343db808b180507b202f98fe4da8e0e7fa (diff) | |
| download | cpython-git-b1c6f59d7100aa34a1ea39eb828f392fa0988ea6.tar.gz | |
Branch merge
Diffstat (limited to 'Lib/packaging/tests/test_command_build_py.py')
| -rw-r--r-- | Lib/packaging/tests/test_command_build_py.py | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/Lib/packaging/tests/test_command_build_py.py b/Lib/packaging/tests/test_command_build_py.py index 4d93faa012..f7f26dafe9 100644 --- a/Lib/packaging/tests/test_command_build_py.py +++ b/Lib/packaging/tests/test_command_build_py.py @@ -67,8 +67,6 @@ class BuildPyTestCase(support.TempdirManager, def test_empty_package_dir(self): # See SF 1668596/1720897. - cwd = os.getcwd() - # create the distribution files. sources = self.mkdtemp() pkg = os.path.join(sources, 'pkg') @@ -79,24 +77,16 @@ class BuildPyTestCase(support.TempdirManager, open(os.path.join(testdir, "testfile"), "wb").close() os.chdir(sources) - old_stdout = sys.stdout - #sys.stdout = StringIO.StringIO() + dist = Distribution({"packages": ["pkg"], + "package_dir": sources, + "package_data": {"pkg": ["doc/*"]}}) + dist.script_args = ["build"] + dist.parse_command_line() try: - dist = Distribution({"packages": ["pkg"], - "package_dir": sources, - "package_data": {"pkg": ["doc/*"]}}) - dist.script_args = ["build"] - dist.parse_command_line() - - try: - dist.run_commands() - except PackagingFileError: - self.fail("failed package_data test when package_dir is ''") - finally: - # Restore state. - os.chdir(cwd) - sys.stdout = old_stdout + dist.run_commands() + except PackagingFileError: + self.fail("failed package_data test when package_dir is ''") def test_byte_compile(self): project_dir, dist = self.create_dist(py_modules=['boiledeggs']) |
