mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 20:22:46 +00:00
Comments for test class.
This commit is contained in:
parent
4d373ee201
commit
f80debc740
1 changed files with 7 additions and 1 deletions
|
@ -48,7 +48,7 @@ def tito(argstring):
|
||||||
|
|
||||||
class CargoTagTest(unittest.TestCase):
|
class CargoTagTest(unittest.TestCase):
|
||||||
"""
|
"""
|
||||||
XXX
|
Test 'CargoBump' class.
|
||||||
"""
|
"""
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.repo_dir = tempfile.mkdtemp("-titocargotest")
|
self.repo_dir = tempfile.mkdtemp("-titocargotest")
|
||||||
|
@ -99,12 +99,18 @@ class CargoTagTest(unittest.TestCase):
|
||||||
|
|
||||||
|
|
||||||
def test_cargo_toml_tag(self):
|
def test_cargo_toml_tag(self):
|
||||||
|
"""
|
||||||
|
Check that the version string in Cargo.toml file is the same as in spec file
|
||||||
|
"""
|
||||||
changelog = getoutput("grep version Cargo.toml")
|
changelog = getoutput("grep version Cargo.toml")
|
||||||
re_version = re.compile(r'"(\d+\.\d+\.\d+)"')
|
re_version = re.compile(r'"(\d+\.\d+\.\d+)"')
|
||||||
version = re_version.findall(changelog)
|
version = re_version.findall(changelog)
|
||||||
assert version[0] == "0.1.8"
|
assert version[0] == "0.1.8"
|
||||||
|
|
||||||
def test_git_contains_cargo(self):
|
def test_git_contains_cargo(self):
|
||||||
|
"""
|
||||||
|
Check presence of the Cargo.toml file in the last commit (tag)
|
||||||
|
"""
|
||||||
diff = getoutput("git diff HEAD^ -- Cargo.toml")
|
diff = getoutput("git diff HEAD^ -- Cargo.toml")
|
||||||
assert diff.find("-version = \"0.0.1\"") != -1
|
assert diff.find("-version = \"0.0.1\"") != -1
|
||||||
assert diff.find("+version = \"0.1.8\"") != -1
|
assert diff.find("+version = \"0.1.8\"") != -1
|
||||||
|
|
Loading…
Add table
Reference in a new issue