Skip to content

Commit

Permalink
Add a unit test for --always-copy option
Browse files Browse the repository at this point in the history
  • Loading branch information
vldmit authored and qwcode committed Dec 6, 2013
1 parent c7445d2 commit 93d52c1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_virtualenv.py
Expand Up @@ -121,3 +121,20 @@ def test_install_python_bin():
"exist in bin_dir" % pth)
finally:
shutil.rmtree(tmp_virtualenv)


def test_always_copy_option():
"""Should be no symlinks in directory tree"""
if virtualenv.is_win:
return # no symlinks on win32
tmp_virtualenv = tempfile.mkdtemp()
try:
virtualenv.create_environment(tmp_virtualenv, symlink=False)

for root, dirs, files in os.walk(tmp_virtualenv):
for f in files:
full_name = os.path.join(root, f)
assert not os.path.islink(full_name), "%s should not be a" \
" symlink" % full_name
finally:
shutil.rmtree(tmp_virtualenv)

0 comments on commit 93d52c1

Please sign in to comment.