Skip to content

Commit

Permalink
🚧 tempoorary fix for Popen because of simplistix/testfixtures#71
Browse files Browse the repository at this point in the history
  • Loading branch information
guyzmo committed Nov 18, 2017
1 parent 811eb51 commit 8c42ba4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ def setup_git_popen(self):
self.repository = Repo.init(self.tempdir.name)
# setup git command mockup
self.Popen = MockPopen()
def FixPopen(*a, **k):
if 'start_new_session' in k:
del k['start_new_session']
return self.Popen.Popen(*a, **k)
self.Popen.mock.Popen.side_effect = FixPopen
self.Popen.mock.Popen_instance.stdin = None
self.Popen.mock.Popen_instance.wait = lambda *a, **k: self.Popen.wait()
self.Popen.mock.Popen_instance.__enter__ = lambda self: self
Expand Down

0 comments on commit 8c42ba4

Please sign in to comment.