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

Python3 support #46

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Get rid of deprecated contextlib.nested
  • Loading branch information
eprikazc committed Dec 21, 2016
commit 3780e637e9a261e79cfa62130ec38e35372d6049
10 changes: 4 additions & 6 deletions src/gitsweep/tests/testcases.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
from uuid import uuid4 as uuid
from shutil import rmtree
from shlex import split
from contextlib import contextmanager, nested
from contextlib import contextmanager
from textwrap import dedent

from mock import patch
@@ -245,11 +245,9 @@ def gscommand(self, command):

self.cli.args = args[1:]

patches = (
patch.object(sys, 'stdout'),
patch.object(sys, 'stderr'))

with nested(*patches):
with (
patch.object(sys, 'stdout'),
patch.object(sys, 'stderr')):
stdout = sys.stdout
stderr = sys.stderr
try: