diff options
author | Jun Wang <junbill.wang@samsung.com> | 2016-03-22 00:23:09 +0800 |
---|---|---|
committer | Jun Wang <junbill.wang@samsung.com> | 2016-03-22 00:23:09 +0800 |
commit | 212d7cb7cf1afc9ad03e995e71b9fb54372f7f10 (patch) | |
tree | aee0dfee277e8182180f994228e62c5849c266d2 | |
parent | 98ebae2eb4504a80000aa21a4ddc6266e25c17cb (diff) | |
download | git-buildpackage-212d7cb7cf1afc9ad03e995e71b9fb54372f7f10.tar.gz git-buildpackage-212d7cb7cf1afc9ad03e995e71b9fb54372f7f10.tar.bz2 git-buildpackage-212d7cb7cf1afc9ad03e995e71b9fb54372f7f10.zip |
1.Change to way to get test data dirctory
2.Fix the error of indent in tests/20_test_rpm.py
3.Change to vendor tag
Change-Id: Ia9520a6c441fa9d34eff76c96a41764f3fb0ba76
-rw-r--r-- | tests/20_test_rpm.py | 4 | ||||
-rw-r--r-- | tests/component/rpm/test_import_srpm.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/20_test_rpm.py b/tests/20_test_rpm.py index f76b129f..52a14ff1 100644 --- a/tests/20_test_rpm.py +++ b/tests/20_test_rpm.py @@ -27,7 +27,7 @@ from gbp.rpm import (SrcRpmFile, SpecFile, parse_srpm, NoSpecError, guess_spec, guess_spec_repo, spec_from_repo) from gbp.git.repository import GitRepository -DATA_DIR = os.path.abspath(os.path.splitext(__file__)[0] + '_data') +DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data','rpm') SRPM_DIR = os.path.join(DATA_DIR, 'srpms') SPEC_DIR = os.path.join(DATA_DIR, 'specs') @@ -390,7 +390,7 @@ class TestUtilityFunctions(object): def test_parse_srpm(self): """Test parse_srpm() function""" parse_srpm(os.path.join(SRPM_DIR, 'gbp-test-1.0-1.src.rpm')) - assert_raises(GbpError, parse_srpm, + assert_raises(GbpError, parse_srpm, os.path.join(DATA_DIR, 'notexists.src.rpm')) """ diff --git a/tests/component/rpm/test_import_srpm.py b/tests/component/rpm/test_import_srpm.py index de28259a..b35a5bd6 100644 --- a/tests/component/rpm/test_import_srpm.py +++ b/tests/component/rpm/test_import_srpm.py @@ -158,7 +158,7 @@ class TestImportPacked(ComponentTestBase): eq_(len(repo.get_commits(until='upstream')), 2) # Check number of tags eq_(len(repo.get_tags('upstream/*')), 2) - eq_(len(repo.get_tags('packaging/*')), 3) + eq_(len(repo.get_tags('vendor/*')), 3) def test_import_to_existing(self): """Test importing to an existing repo""" |