2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 16:51:54 +00:00

Allow for slightly different wording in git output

This commit is contained in:
Martin Green 2022-06-25 01:05:29 +01:00
parent 48f82aaaca
commit abdea22899

View File

@ -151,7 +151,6 @@ class SubprocessTest(TestCase):
import troggle.settings as settings
TROGGLE_PATH = Path(settings.REPOS_ROOT_PATH) / "troggle"
for cwd in [settings.EXPOWEB, settings.DRAWINGS_DATA, TROGGLE_PATH]: # add settings.SURVEX_DATA when loser is gitified
sp = subprocess.run([settings.GIT, "status"], cwd=cwd, capture_output=True, text=True)
scwd = str(cwd)
#print(scwd + ":\n\n" + sp.stderr + '\n\n' + sp.stdout + '\n\nreturn code: ' + str(sp.returncode))
@ -160,7 +159,7 @@ class SubprocessTest(TestCase):
self.assertTrue( sp.returncode == 0, f'{scwd} - git is unhappy')
content = sp.stdout
ph = r'Your branch is up to date'
ph = r'Your branch is up[ -]to[ -]date'
phmatch = re.search(ph, content)
self.assertIsNotNone(phmatch, f"{scwd} - Failed to find expected git output: '" + ph +"'")