diff options
Diffstat (limited to 'tasks.py')
-rw-r--r-- | tasks.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1,9 +1,11 @@ +import os from os.path import join from shutil import rmtree, copytree from invoke import Collection, task from invocations.docs import docs, www, sites from invocations.packaging.release import ns as release_coll, publish +from invocations.testing import count_errors # Until we move to spec-based testing @@ -14,7 +16,13 @@ def test(ctx, coverage=False, flags=""): runner = "python" if coverage: runner = "coverage run --source=paramiko" - ctx.run("{0} test.py {1}".format(runner, flags), pty=True) + # Strip SSH_AUTH_SOCK from parent env to avoid pollution by interactive + # users. + env = dict(os.environ) + if 'SSH_AUTH_SOCK' in env: + del env['SSH_AUTH_SOCK'] + cmd = "{0} test.py {1}".format(runner, flags) + ctx.run(cmd, pty=True, env=env, replace_env=True) @task @@ -49,7 +57,7 @@ def release(ctx, sdist=True, wheel=True, sign=True, dry_run=False): # aliasing, defaults etc. release_coll.tasks['publish'] = release -ns = Collection(test, coverage, release_coll, docs, www, sites) +ns = Collection(test, coverage, release_coll, docs, www, sites, count_errors) ns.configure({ 'packaging': { # NOTE: many of these are also set in kwarg defaults above; but having |