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

tidy test fior git clean

This commit is contained in:
Philip Sargent 2023-03-08 18:29:14 +00:00
parent b3d9eeecd2
commit 2c36666d41

View File

@ -228,18 +228,18 @@ class SubprocessTest(TestCase):
self.assertTrue(sp.returncode == 0, f"{cwd} - git is unhappy") self.assertTrue(sp.returncode == 0, f"{cwd} - git is unhappy")
content = sp.stdout content = sp.stdout
ph = r"Your branch is up[ -]to[ -]date" ph = r"nothing to commit, working tree clean"
phmatch = re.search(ph, content) phmatch = re.search(ph, content)
msg = f'{cwd} - Failed to find expected git output: "{ph}"' msg = f'{cwd} - Failed to find expected git output: "{ph}"'
self.assertIsNotNone(phmatch, msg) self.assertIsNotNone(phmatch, msg)
ph1 = r"no changes added to commit" # ph1 = r"no changes added to commit"
phmatch1 = re.search(ph1, content) # phmatch1 = re.search(ph1, content)
ph2 = r"nothing to commit" # ph2 = r"nothing to commit"
phmatch2 = re.search(ph2, content) # phmatch2 = re.search(ph2, content)
phmatch = phmatch1 or phmatch2 # phmatch = phmatch1 or phmatch2
msg = f'{cwd} - Failed to find expected git output: "{ph1}" or "{ph2}"' # msg = f'{cwd} - Failed to find expected git output: "{ph1}" or "{ph2}"'
self.assertIsNotNone(phmatch, msg) # self.assertIsNotNone(phmatch, msg)
def test_loser_survex_status(self): def test_loser_survex_status(self):
"""Expects no failures of survex files""" """Expects no failures of survex files"""