|
@@ -26,6 +26,7 @@ import tempfile
|
|
|
import unittest
|
|
import unittest
|
|
|
|
|
|
|
|
import git_command
|
|
import git_command
|
|
|
|
|
+import main
|
|
|
import platform_utils
|
|
import platform_utils
|
|
|
from pyversion import is_python3
|
|
from pyversion import is_python3
|
|
|
import wrapper
|
|
import wrapper
|
|
@@ -83,6 +84,16 @@ class RepoWrapperUnitTest(RepoWrapperTestCase):
|
|
|
self.assertEqual('', stderr.getvalue())
|
|
self.assertEqual('', stderr.getvalue())
|
|
|
self.assertIn('repo launcher version', stdout.getvalue())
|
|
self.assertIn('repo launcher version', stdout.getvalue())
|
|
|
|
|
|
|
|
|
|
+ def test_python_constraints(self):
|
|
|
|
|
+ """The launcher should never require newer than main.py."""
|
|
|
|
|
+ self.assertGreaterEqual(main.MIN_PYTHON_VERSION_HARD,
|
|
|
|
|
+ wrapper.MIN_PYTHON_VERSION_HARD)
|
|
|
|
|
+ self.assertGreaterEqual(main.MIN_PYTHON_VERSION_SOFT,
|
|
|
|
|
+ wrapper.MIN_PYTHON_VERSION_SOFT)
|
|
|
|
|
+ # Make sure the versions are themselves in sync.
|
|
|
|
|
+ self.assertGreaterEqual(wrapper.MIN_PYTHON_VERSION_SOFT,
|
|
|
|
|
+ wrapper.MIN_PYTHON_VERSION_HARD)
|
|
|
|
|
+
|
|
|
def test_init_parser(self):
|
|
def test_init_parser(self):
|
|
|
"""Make sure 'init' GetParser works."""
|
|
"""Make sure 'init' GetParser works."""
|
|
|
parser = self.wrapper.GetParser(gitc_init=False)
|
|
parser = self.wrapper.GetParser(gitc_init=False)
|