15
15
from git import Repo , Remote , GitCommandError , Git
16
16
from git .compat import string_types
17
17
18
- GIT_REPO = os .path .dirname (os .path .dirname (os .path .dirname (os .path .dirname (__file__ ))))
18
+ osp = os .path .dirname
19
+
20
+ GIT_REPO = os .environ .get ("GIT_PYTHON_TEST_GIT_REPO_BASE" , osp (osp (osp (osp (__file__ )))))
19
21
20
22
__all__ = (
21
23
'fixture_path' , 'fixture' , 'absolute_project_path' , 'StringProcessAdapter' ,
26
28
27
29
28
30
def fixture_path (name ):
29
- test_dir = os . path . dirname ( os . path . dirname (__file__ ))
31
+ test_dir = osp ( osp (__file__ ))
30
32
return os .path .join (test_dir , "fixtures" , name )
31
33
32
34
@@ -35,7 +37,7 @@ def fixture(name):
35
37
36
38
37
39
def absolute_project_path ():
38
- return os .path .abspath (os .path .join (os . path . dirname (__file__ ), ".." , ".." ))
40
+ return os .path .abspath (os .path .join (osp (__file__ ), ".." , ".." ))
39
41
40
42
#} END routines
41
43
@@ -195,7 +197,7 @@ def remote_repo_creator(self):
195
197
196
198
d_remote .config_writer .set ('url' , remote_repo_url )
197
199
198
- temp_dir = os . path . dirname (_mktemp ())
200
+ temp_dir = osp (_mktemp ())
199
201
# On windows, this will fail ... we deal with failures anyway and default to telling the user to do it
200
202
try :
201
203
gd = Git ().daemon (temp_dir , enable = 'receive-pack' , as_process = True )
0 commit comments