mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #37288 from cachedout/fix_extend_test_2
Reset dir for extend test
This commit is contained in:
commit
3b1e2f1839
@ -28,12 +28,15 @@ import salt.utils
|
|||||||
|
|
||||||
class ExtendTestCase(TestCase):
|
class ExtendTestCase(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
self.starting_dir = os.getcwd()
|
||||||
|
os.chdir(integration.CODE_DIR)
|
||||||
self.out = None
|
self.out = None
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
if self.out is not None:
|
if self.out is not None:
|
||||||
if os.path.exists(self.out):
|
if os.path.exists(self.out):
|
||||||
shutil.rmtree(self.out, True)
|
shutil.rmtree(self.out, True)
|
||||||
|
os.chdir(self.starting_dir)
|
||||||
|
|
||||||
@patch('sys.exit', MagicMock)
|
@patch('sys.exit', MagicMock)
|
||||||
def test_run(self):
|
def test_run(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user