Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 86150E405 for ; Tue, 4 Dec 2012 14:26:17 +0000 (UTC) Received: (qmail 61274 invoked by uid 500); 4 Dec 2012 14:26:17 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 61236 invoked by uid 500); 4 Dec 2012 14:26:17 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 59583 invoked by uid 99); 4 Dec 2012 14:26:15 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2012 14:26:15 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B090E818276; Tue, 4 Dec 2012 14:26:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tvansteenburgh@apache.org To: allura-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [7/29] git commit: [#5037] ticket:202 expand tests for directory paths Message-Id: <20121204142614.B090E818276@tyr.zones.apache.org> Date: Tue, 4 Dec 2012 14:26:14 +0000 (UTC) [#5037] ticket:202 expand tests for directory paths Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/b030b67f Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b030b67f Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b030b67f Branch: refs/heads/tv/5382 Commit: b030b67f001edf8c28dc329cafd83847fe4a7ce2 Parents: 712ef42 Author: Igor Bondarenko Authored: Wed Nov 7 11:05:58 2012 +0000 Committer: Cory Johns Committed: Mon Dec 3 23:56:27 2012 +0000 ---------------------------------------------------------------------- ForgeGit/forgegit/tests/model/test_repository.py | 13 +++++++++++++ ForgeHg/forgehg/tests/model/test_repository.py | 13 +++++++++++++ 2 files changed, 26 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b030b67f/ForgeGit/forgegit/tests/model/test_repository.py ---------------------------------------------------------------------- diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py index fc49ebe..fac154e 100644 --- a/ForgeGit/forgegit/tests/model/test_repository.py +++ b/ForgeGit/forgegit/tests/model/test_repository.py @@ -274,6 +274,15 @@ class TestGitCommit(unittest.TestCase): assert commits == ['9a7df788cf800241e3bb5a849c8870f2f8259d98'] commits = self.repo.commits('README', 'df30427c488aeab84b2352bdf88a3b19223f9d7a', skip=1) assert commits == [] + # path to dir + commits = self.repo.commits('a/b/c/') + assert commits == ['6a45885ae7347f1cac5103b0050cc1be6a1496c8', '9a7df788cf800241e3bb5a849c8870f2f8259d98'] + commits = self.repo.commits('a/b/c/', skip=1) + assert commits == ['9a7df788cf800241e3bb5a849c8870f2f8259d98'] + commits = self.repo.commits('a/b/c/', limit=1) + assert commits == ['6a45885ae7347f1cac5103b0050cc1be6a1496c8'] + commits = self.repo.commits('not/exist/') + assert commits == [] def test_commits_count(self): commits = self.repo.commits_count() @@ -284,6 +293,10 @@ class TestGitCommit(unittest.TestCase): assert commits == 3, commits commits = self.repo.commits_count('a/b/c/hello.txt', '6a45885ae7347f1cac5103b0050cc1be6a1496c8') assert commits == 2, commits + commits = self.repo.commits_count('a/b/c/') + assert commits == 2, commits + commits = self.repo.commits_count('not/exist/') + assert commits == 0, commits class TestGitHtmlView(unittest.TestCase): http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b030b67f/ForgeHg/forgehg/tests/model/test_repository.py ---------------------------------------------------------------------- diff --git a/ForgeHg/forgehg/tests/model/test_repository.py b/ForgeHg/forgehg/tests/model/test_repository.py index da93f20..1654cf0 100644 --- a/ForgeHg/forgehg/tests/model/test_repository.py +++ b/ForgeHg/forgehg/tests/model/test_repository.py @@ -269,6 +269,15 @@ class TestHgCommit(unittest.TestCase): assert commits == ['773d2f8e3a94d0d5872988b16533d67e1a7f5462'], commits commits = self.repo.commits('README', '773d2f8e3a94d0d5872988b16533d67e1a7f5462', skip=1) assert commits == [] + # path to dir + commits = self.repo.commits('a/b/c/') + assert commits == ['1c7eb55bbd66ff45906b4a25d4b403899e0ffff1', '23d1d8b68c8d6f3326bd42bcc30c40fffe77372c'] + commits = self.repo.commits('a/b/c/', skip=1) + assert commits == ['23d1d8b68c8d6f3326bd42bcc30c40fffe77372c'] + commits = self.repo.commits('a/b/c/', limit=1) + assert commits == ['1c7eb55bbd66ff45906b4a25d4b403899e0ffff1'] + commits = self.repo.commits('not/exist/') + assert commits == [] def test_commits_count(self): commits = self.repo.commits_count() @@ -279,3 +288,7 @@ class TestHgCommit(unittest.TestCase): assert commits == 3, commits commits = self.repo.commits_count('README', '773d2f8e3a94d0d5872988b16533d67e1a7f5462') assert commits == 1, commits + commits = self.repo.commits_count('a/b/c/') + assert commits == 2, commits + commits = self.repo.commits_count('not/exist/') + assert commits == 0, commits