From abdea228995e9b873d0ea60aec275fc8c144f9e9 Mon Sep 17 00:00:00 2001 From: Martin Green Date: Sat, 25 Jun 2022 01:05:29 +0100 Subject: [PATCH] Allow for slightly different wording in git output --- core/TESTS/test_imports.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/TESTS/test_imports.py b/core/TESTS/test_imports.py index 4b35422..f5f7e7c 100644 --- a/core/TESTS/test_imports.py +++ b/core/TESTS/test_imports.py @@ -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 +"'")