Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop emulating mmap on Windows #542

Merged
merged 2 commits into from
Oct 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions git/test/performance/test_odb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

import sys
from time import time
from unittest.case import skipIf

from git.compat import PY3
from git.util import HIDE_WINDOWS_KNOWN_ERRORS

from .lib import (
TestBigRepoR
Expand All @@ -15,8 +11,6 @@

class TestObjDBPerformance(TestBigRepoR):

@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and PY3,
"FIXME: smmp fails with: TypeError: Can't convert 'bytes' object to str implicitly")
def test_random_access(self):
results = [["Iterate Commits"], ["Iterate Blobs"], ["Retrieve Blob Data"]]
for repo in (self.gitrorepo, self.puregitrorepo):
Expand Down
2 changes: 0 additions & 2 deletions git/test/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,6 @@ def test_git_file(self, rwrepo):
git_file_repo = Repo(rwrepo.working_tree_dir)
self.assertEqual(osp.abspath(git_file_repo.git_dir), real_path_abs)

@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and PY3,
"FIXME: smmp fails with: TypeError: Can't convert 'bytes' object to str implicitly")
def test_file_handle_leaks(self):
def last_commit(repo, rev, path):
commit = next(repo.iter_commits(rev, path, max_count=1))
Expand Down
15 changes: 0 additions & 15 deletions git/test/test_submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from git.cmd import Git
from git.compat import (
string_types,
is_win,
)
from git.exc import (
InvalidGitRepositoryError,
Expand Down Expand Up @@ -38,20 +37,6 @@
import os.path as osp


# Change the configuration if possible to prevent the underlying memory manager
# to keep file handles open. On windows we get problems as they are not properly
# closed due to mmap bugs on windows (as it appears)
if is_win:
try:
import smmap.util # @UnusedImport
smmap.util.MapRegion._test_read_into_memory = True
except ImportError:
sys.stderr.write("The submodule tests will fail as some files cannot be removed due to open file handles.\n")
sys.stderr.write(
"The latest version of gitdb uses a memory map manager which can be configured to work around this problem")
# END handle windows platform


class TestRootProgress(RootUpdateProgress):

"""Just prints messages, for now without checking the correctness of the states"""
Expand Down