allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [19/49] git commit: [#5037] ticket:202 expand tests for directory paths
Date Fri, 07 Dec 2012 22:26:36 GMT
[#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/db/4803
Commit: b030b67f001edf8c28dc329cafd83847fe4a7ce2
Parents: 712ef42
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed Nov 7 11:05:58 2012 +0000
Committer: Cory Johns <johnsca@geek.net>
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


Mime
View raw message