| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1d10bdc commit 5714844
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -81,7 +81,7 @@ | |||
| 81 | 81 | ] | |
| 82 | 82 | ||
| 83 | 83 | __version__ = "git" | |
| 84 | - if __version__ == "git": | ||
| 84 | + if "git" == __version__: | ||
| 85 | 85 | # Wheels and source distributions stamp this value; editable imports do not. | |
| 86 | 86 | from pathlib import Path as _Path | |
| 87 | 87 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ | |||
| 7 | 7 | import subprocess | |
| 8 | 8 | import sys | |
| 9 | 9 | ||
| 10 | - from git import _backend | ||
| 10 | + from git import __version__, _backend | ||
| 11 | 11 | from test.lib import TestCase, requires_symlinks | |
| 12 | 12 | from test.lib.fixtures import ROOT, writable_fixture | |
| 13 | 13 | ||
@@ -44,6 +44,10 @@ def _test_installation(self, environment): | |||
| 44 | 44 | self._check_result(result, "Backend selection failed") | |
| 45 | 45 | self.assertEqual(result.stdout.strip(), _backend.name) | |
| 46 | 46 | ||
| 47 | + result = run([python, "-c", "import git; print(git.__version__)"]) | ||
| 48 | + self._check_result(result, "Installed version import failed") | ||
| 49 | + self.assertEqual(result.stdout.strip(), __version__) | ||
| 50 | + | ||
| 47 | 51 | result = run([python, "-c", "import gitdb; import smmap"]) | |
| 48 | 52 | self._check_result(result, "Dependencies not installed") | |
| 49 | 53 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments