incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [15/21] git commit: [#6235] ticket:366 Use g.tmpdir in tests
Date Mon, 03 Jun 2013 13:37:57 GMT
[#6235] ticket:366 Use g.tmpdir in tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2cd57fd8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2cd57fd8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2cd57fd8

Branch: refs/heads/master
Commit: 2cd57fd8c4a2e5227f3c58b48c9e74ef154e5045
Parents: d0edb5c
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Fri May 24 14:04:55 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000

----------------------------------------------------------------------
 ForgeSVN/forgesvn/tests/model/test_repository.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2cd57fd8/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 28b980b..5840033 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -319,7 +319,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
                               'test-svn-tags-19-tags-tag-1.0/svn-commit.tmp',
                               'test-svn-tags-19-tags-tag-1.0/README'])
         h.set_context('test', 'svn-tags', neighborhood='Projects')
-        tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
+        tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
         fn = tarball_path + 'test-svn-tags-19-tags-tag-1.0.zip'
         self.svn_tags.tarball(rev, '/tags/tag-1.0/')
         assert os.path.isfile(fn), fn
@@ -353,7 +353,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
                                  'test-svn-tags-19-branches-aaa/svn-commit.tmp',
                                  'test-svn-tags-19-branches-aaa/README'])
         h.set_context('test', 'svn-tags', neighborhood='Projects')
-        tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
+        tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
         fn = tarball_path + 'test-svn-tags-19-branches-aaa.zip'
         self.svn_tags.tarball(rev, '/branches/aaa/')
         assert os.path.isfile(fn), fn
@@ -388,7 +388,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
                                 'test-svn-tags-19-trunk/ccc.txt',
                                 'test-svn-tags-19-trunk/README'])
         h.set_context('test', 'svn-tags', neighborhood='Projects')
-        tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
+        tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
         fn = tarball_path + 'test-svn-tags-19-trunk.zip'
         self.svn_tags.tarball(rev, '/trunk/')
         assert os.path.isfile(fn), fn
@@ -410,12 +410,12 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
         # no path, and no trunk dir
         # expect snapshot of repo root
         h.set_context('test', 'src', neighborhood='Projects')
-        fn = '/tmp/tarball/svn/t/te/test/testsvn/test-src-1.zip'
+        fn = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn/test-src-1.zip')
         self.repo.tarball('1')
         assert os.path.isfile(fn), fn
         snapshot = ZipFile(fn, 'r')
         assert_equal(snapshot.namelist(), ['test-src-1/', 'test-src-1/README'])
-        shutil.rmtree('/tmp/tarball/svn/t/te/test/testsvn/', ignore_errors=True)
+        shutil.rmtree(os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn/'), ignore_errors=True)
         shutil.rmtree(tarball_path, ignore_errors=True)
 
     def test_is_empty(self):


Mime
View raw message