Skip to content

Commit

Permalink
Update unit tests to not inherit environment
Browse files Browse the repository at this point in the history
This commit updates the unit tests to always start with a known set of
environment variables rather than inheriting the environment from the
shell running the tests. This avoids breakage when there's something
in the environment that AsyncSSH looks for that the test case didn't
intend to set.
  • Loading branch information
ronf committed Dec 17, 2016
1 parent 76f4eba commit 6188a4c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/server.py
Expand Up @@ -132,8 +132,7 @@ def asyncSetUpClass(cls):
cls._server_port))
run('cat skey.pub >> .ssh/known_hosts')

os.environ['LOGNAME'] = 'guest'
os.environ['HOME'] = '.'
os.environ = {'LOGNAME': 'guest', 'HOME': '.'}

try:
output = run('ssh-agent -a agent 2>/dev/null')
Expand Down

0 comments on commit 6188a4c

Please sign in to comment.