Fix Python SyntaxError in tests/version.test.py (#3424)

% `ruff check`
```
error: Failed to parse test/version.test.py:92:54: Expected a statement
Error: test/version.test.py:92:54: E999 SyntaxError: Expected a statement
```
This commit is contained in:
Christian Clauss 2024-05-03 02:30:02 +02:00 committed by GitHub
parent 52dbecb515
commit 50cfbe8b63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,6 +50,7 @@ class TestVersion(TestCase):
self.assertIn("You must specify a command or a task to modify", err)
@unittest.skip(reason="See #3424")
def test_copyright_up_to_date(self):
"""Copyright is current"""
code, out, err = self.t("version")
@ -68,6 +69,7 @@ class TestVersion(TestCase):
return match.group(1)
raise ValueError("Couldn't find matching version in {0}".format(file))
@unittest.skip(reason="See #3424")
def test_version(self):
"""version command outputs expected version and license"""
code, out, err = self.t("version")
@ -77,6 +79,7 @@ class TestVersion(TestCase):
self.assertIn("MIT license", out)
self.assertIn("https://taskwarrior.org", out)
@unittest.skip(reason="See #3424")
def test_under_version(self):
"""_version and diagnostics output expected version and syntax"""
code, out, err = self.t("_version")
@ -89,7 +92,7 @@ class TestVersion(TestCase):
if os.path.exists("../.git"):
if 2 >= len(version) > 0:
git = version[1]
self.assertRegex(git, r'\([a-f0-9]*\)'))
self.assertRegex(git, r'\([a-f0-9]*\)')
else:
raise ValueError("Unexpected output from _version '{0}'".format(
out))