Move cwd() to tests-only

This commit is contained in:
Anthony Sottile 2018-02-24 16:44:59 -08:00
parent 082c950d8f
commit 29033f10ca
21 changed files with 84 additions and 103 deletions

View file

@ -16,16 +16,6 @@ from pre_commit import five
from pre_commit import parse_shebang
@contextlib.contextmanager
def cwd(path):
original_cwd = os.getcwd()
os.chdir(path)
try:
yield
finally:
os.chdir(original_cwd)
def mkdirp(path):
try:
os.makedirs(path)