cue: properly decode() subprocess.check_output()

(breaks on Python 3)
This commit is contained in:
Ralph Lange
2020-06-11 19:33:25 +02:00
parent 3dff483254
commit 769a8ad08d
2 changed files with 6 additions and 5 deletions

View File

@@ -232,7 +232,7 @@ class TestAddDependencyUpToDateCheck(unittest.TestCase):
def is_shallow_repo(place):
check = sp.check_output(['git', 'rev-parse', '--is-shallow-repository'], cwd=place).strip()
check = sp.check_output(['git', 'rev-parse', '--is-shallow-repository'], cwd=place).strip().decode('ascii')
if check == '--is-shallow-repository':
if os.path.exists(os.path.join(place, '.git', 'shallow')):
check = 'true'
@@ -276,7 +276,7 @@ class TestAddDependencyOptions(unittest.TestCase):
cue.setup['MCoreUtils_DEPTH'] = '3'
cue.add_dependency('MCoreUtils')
self.assertTrue(is_shallow_repo(self.location),
'Module not checked out shallow (requested: default=5)')
'Module not checked out shallow (requested: depth=3)')
def test_AddMsiTo314(self):
cue.complete_setup('BASE')