From 212d7cb7cf1afc9ad03e995e71b9fb54372f7f10 Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Tue, 22 Mar 2016 00:23:09 +0800 Subject: 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 --- tests/20_test_rpm.py | 4 ++-- 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""" -- cgit v1.2.3