Skip to content

Commit 8bf3bb1

Browse files
authored
Merge pull request #284 from jdmansour/fix-test-env
Make tests work with different default branch, or different locale
2 parents 25446a3 + f6107d9 commit 8bf3bb1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

nbgitpuller/pull.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def execute_cmd(cmd, **kwargs):
1616
yield '$ {}\n'.format(' '.join(cmd))
1717
kwargs['stdout'] = subprocess.PIPE
1818
kwargs['stderr'] = subprocess.STDOUT
19+
# Explicitly set LANG=C, as `git` commandline output will be different if
20+
# the user environment has a different locale set!
21+
kwargs['env'] = dict(os.environ, LANG='C')
1922

2023
proc = subprocess.Popen(cmd, **kwargs)
2124

tests/repohelpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self, path=None):
1818

1919
def __enter__(self):
2020
os.makedirs(self.path, exist_ok=True)
21-
self.git('init', '--bare')
21+
self.git('init', '--bare', '--initial-branch=master')
2222
return self
2323

2424
def __exit__(self, *args):

0 commit comments

Comments
 (0)