| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7cd47ae commit 4ba76d6
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ | |||
| 19 | 19 | def _init_externals(): | |
| 20 | 20 | """Initialize external projects by putting them into the path""" | |
| 21 | 21 | if __version__ == 'git' and 'PYOXIDIZER' not in os.environ: | |
| 22 | - sys.path.insert(0, osp.join(osp.dirname(__file__), 'ext', 'gitdb')) | ||
| 22 | + sys.path.insert(1, osp.join(osp.dirname(__file__), 'ext', 'gitdb')) | ||
| 23 | 23 | ||
| 24 | 24 | try: | |
| 25 | 25 | import gitdb | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,7 @@ | |||
| 1 | 1 | # This module is part of GitPython and is released under | |
| 2 | 2 | # the BSD License: http://www.opensource.org/licenses/bsd-license.php | |
| 3 | 3 | ||
| 4 | + import ast | ||
| 4 | 5 | import os | |
| 5 | 6 | import subprocess | |
| 6 | 7 | from test.lib import TestBase | |
@@ -27,3 +28,8 @@ def test_installation(self, rw_dir): | |||
| 27 | 28 | self.assertEqual(0, result.returncode, msg=result.stderr or result.stdout or "Can't build - setup.py failed") | |
| 28 | 29 | result = subprocess.run([self.python, '-c', 'import git'], stdout=subprocess.PIPE, cwd=self.sources) | |
| 29 | 30 | self.assertEqual(0, result.returncode, msg=result.stderr or result.stdout or "Selftest failed") | |
| 31 | + result = subprocess.run([self.python, '-c', 'import sys;import git; print(sys.path)'], stdout=subprocess.PIPE, cwd=self.sources) | ||
| 32 | + syspath = result.stdout.decode('utf-8').splitlines()[0] | ||
| 33 | + syspath = ast.literal_eval(syspath) | ||
| 34 | + self.assertEqual('', syspath[0], msg='Failed to follow the conventions for https://docs.python.org/3/library/sys.html#sys.path') | ||
| 35 | + self.assertTrue(syspath[1].endswith('gitdb'), msg='Failed to add gitdb to sys.path') | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments