From d9671e15703918048982c9ff4e2e0fef21ede320 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 5 Nov 2009 20:31:40 +0100 Subject: fixed test_repo to work on windows cmd: taskkill now pipes stderror to nul as well --- test/git/test_repo.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/git/test_repo.py') diff --git a/test/git/test_repo.py b/test/git/test_repo.py index 0b196a1f..93ab7a90 100644 --- a/test/git/test_repo.py +++ b/test/git/test_repo.py @@ -7,15 +7,14 @@ import os, sys from test.testlib import * from git import * +from git.utils import join_path_native +import tempfile class TestRepo(TestBase): @raises(InvalidGitRepositoryError) def test_new_should_raise_on_invalid_repo_location(self): - if sys.platform == "win32": - Repo("C:\\WINDOWS\\Temp") - else: - Repo("/tmp") + Repo(tempfile.gettempdir()) @raises(NoSuchPathError) def test_new_should_raise_on_non_existant_path(self): @@ -220,7 +219,8 @@ class TestRepo(TestBase): def test_untracked_files(self): base = self.rorepo.git.git_dir - files = (base+"/__test_myfile", base+"/__test_other_file") + files = ( join_path_native(base, "__test_myfile"), + join_path_native(base, "__test_other_file") ) num_recently_untracked = 0 try: for fpath in files: @@ -233,7 +233,7 @@ class TestRepo(TestBase): # assure we have all names - they are relative to the git-dir num_test_untracked = 0 for utfile in untracked_files: - num_test_untracked += os.path.join(base, utfile) in files + num_test_untracked += join_path_native(base, utfile) in files assert len(files) == num_test_untracked finally: for fpath in files: -- cgit v1.2.1