Merge pull request #37288 from cachedout/fix_extend_test_2

Reset dir for extend test
This commit is contained in:
Mike Place 2016-10-28 15:03:07 +09:00 committed by GitHub
commit 3b1e2f1839

View File

@ -28,12 +28,15 @@ import salt.utils
class ExtendTestCase(TestCase):
def setUp(self):
self.starting_dir = os.getcwd()
os.chdir(integration.CODE_DIR)
self.out = None
def tearDown(self):
if self.out is not None:
if os.path.exists(self.out):
shutil.rmtree(self.out, True)
os.chdir(self.starting_dir)
@patch('sys.exit', MagicMock)
def test_run(self):