Skip to content

Commit

Permalink
Fix a few test errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhuramachandran committed Aug 30, 2018
1 parent 1df44ca commit 577c205
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions automan/tests/test_automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
except ImportError:
raise unittest.SkipTest('test_jobs requires psutil')

from automan.tests.test_jobs import wait_until
from automan.tests.test_jobs import wait_until, safe_rmtree


class MySimulation(Simulation):
Expand Down Expand Up @@ -97,7 +97,7 @@ def setUp(self):
def tearDown(self):
os.chdir(self.cwd)
if os.path.exists(self.root):
shutil.rmtree(self.root)
safe_rmtree(self.root)


class TestLocalAutomation(TestAutomationBase):
Expand Down Expand Up @@ -177,13 +177,7 @@ def setUp(self):
def tearDown(self):
super(TestRemoteAutomation, self).tearDown()
if os.path.exists(self.other_dir):
if sys.platform.startswith('win'):
try:
shutil.rmtree(self.other_dir)
except WindowsError:
pass
else:
shutil.rmtree(self.other_dir)
safe_rmtree(self.other_dir)

def _make_scheduler(self):
workers = [
Expand Down
2 changes: 1 addition & 1 deletion automan/tests/test_cluster_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class MyClusterManager(ClusterManager):
#!/bin/bash
set -e
python -m venv --system-site-packages envs/{project_name}
python3 -m venv --system-site-packages envs/{project_name}
""")

UPDATE = dedent("""\
Expand Down

0 comments on commit 577c205

Please sign in to comment.