Skip to content

Commit

Permalink
Add test attempting to capture failure, but it passes. Ref #885.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Dec 13, 2016
1 parent 8c055ff commit 357b7c6
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions setuptools/tests/test_namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,26 @@ def test_mixed_site_and_non_site(self, tmpdir):
]
env = dict(PYTHONPATH=python_path)
subprocess.check_call(try_import, env=env)

def test_pkg_resources_import(self, tmpdir):
"""
Ensure that a namespace package doesn't break on import
of pkg_resources.
"""
pkg = namespaces.build_namespace_package(tmpdir, 'myns.pkgA')
target = tmpdir / 'packages'
target.mkdir()
env = dict(PYTHONPATH=str(target))
install_cmd = [
sys.executable,
'-m', 'easy_install',
'-d', str(target),
str(pkg),
]
subprocess.check_call(install_cmd, env=env)
namespaces.make_site_dir(target)
try_import = [
sys.executable,
'-c', 'import pkg_resources',
]
subprocess.check_call(try_import, env=env)

0 comments on commit 357b7c6

Please sign in to comment.