mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Tests: Version test removed
- Veriying that the diag command emits the correct commit SHA1 creates sporadic failures when CMake has not been run against the current commit, and this is not a good test.
This commit is contained in:
parent
2eb488359d
commit
863038905c
1 changed files with 0 additions and 23 deletions
|
@ -82,29 +82,6 @@ class TestVersion(TestCase):
|
||||||
_, hash, _ = run_cmd_wait(git_cmd)
|
_, hash, _ = run_cmd_wait(git_cmd)
|
||||||
return hash.rstrip("\n")
|
return hash.rstrip("\n")
|
||||||
|
|
||||||
def test_under_version(self):
|
|
||||||
"""_version and diagnostics output expected version and syntax"""
|
|
||||||
code, out, err = self.t("_version")
|
|
||||||
|
|
||||||
# version = "x.x.x (git-hash)" or simply "x.x.x"
|
|
||||||
# corresponding to "compiled from git" or "compiled from tarball"
|
|
||||||
version = out.split()
|
|
||||||
|
|
||||||
if 2 >= len(version) > 0:
|
|
||||||
git = version[1]
|
|
||||||
git_expected = "({0})".format(self.slurp_git())
|
|
||||||
self.assertEqual(git_expected, git)
|
|
||||||
else:
|
|
||||||
raise ValueError("Unexpected output from _version '{0}'".format(
|
|
||||||
out))
|
|
||||||
|
|
||||||
ver = version[0]
|
|
||||||
ver_expected = self.slurp()
|
|
||||||
self.assertEqual(ver_expected, ver)
|
|
||||||
|
|
||||||
code, out, err = self.t.diag()
|
|
||||||
self.assertIn(ver_expected, out)
|
|
||||||
|
|
||||||
def test_version_option(self):
|
def test_version_option(self):
|
||||||
"""Verify that 'task --version' returns something valid"""
|
"""Verify that 'task --version' returns something valid"""
|
||||||
code, out, err = self.t("--version")
|
code, out, err = self.t("--version")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue