6
from ..utils import working_directory_keeper
9
class WorkingDirectoryTestCase(unittest.TestCase):
12
self.dirpath = tempfile.mkdtemp()
15
shutil.rmtree(self.dirpath)
17
def test_ctx_manager(self):
18
# warning: if this fails, then many other tests can be
19
# affected, because many don't like being in /
21
with working_directory_keeper:
22
os.chdir(self.dirpath)
23
self.assertNotEqual(os.getcwd(), current)
25
self.assertEqual(os.getcwd(), current)