diff options
| author | holger krekel <holger@merlinux.eu> | 2010-10-21 17:04:51 +0200 |
|---|---|---|
| committer | holger krekel <holger@merlinux.eu> | 2010-10-21 17:04:51 +0200 |
| commit | cb0483406bc9e8da01002680b0e4e68409f17d7e (patch) | |
| tree | 833772644ad5011d8a10f63296209c528ef84f85 | |
| parent | 264fe8f79605cd1594bca9274014ec474e5a2a42 (diff) | |
| download | tox-cb0483406bc9e8da01002680b0e4e68409f17d7e.tar.gz | |
give dummy hash value if asked for a directory
| -rw-r--r-- | tests/test_venv.py | 4 | ||||
| -rw-r--r-- | tox/_venv.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_venv.py b/tests/test_venv.py index 79c6506..0274d62 100644 --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -1,7 +1,7 @@ import py import tox import os, sys -from tox._venv import VirtualEnv, CreationConfig +from tox._venv import VirtualEnv, CreationConfig, getdigest #def test_global_virtualenv(capfd): # v = VirtualEnv() @@ -11,6 +11,8 @@ from tox._venv import VirtualEnv, CreationConfig # assert not out # assert not err # +def test_getdigest(tmpdir): + assert getdigest(tmpdir) == "0"*32 def test_find_executable(): from tox._venv import find_executable diff --git a/tox/_venv.py b/tox/_venv.py index 88751b0..31d25d1 100644 --- a/tox/_venv.py +++ b/tox/_venv.py @@ -254,7 +254,7 @@ class VirtualEnv(object): def getdigest(path): path = py.path.local(path) - if not path.check(): + if not path.check(file=1): return "0" * 32 return path.computehash() |
