Skip to content

Commit e67e41e

Browse files
committed
Manually merging to py2
1 parent 06d10f0 commit e67e41e

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

source_py2/test_python_toolbox/test_context_management/test_abstractness.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def __enter__(self):
6262
def __exit__(self, exc_type, exc_value, exc_traceback):
6363
pass
6464
AnotherContextManager()
65-
def test_isinstance_and_issubclass():
65+
66+
def test_isinstance_and_issubclass():
6667
class Woof(object):
6768
def __enter__(self):
6869
return self

source_py2/test_python_toolbox/test_context_management/test_as_idempotent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2009-2015 Ram Rachum.
22
# This program is distributed under the MIT license.
33

4-
import queue as queue_module
4+
import Queue as queue_module
55

66
from python_toolbox.context_management import (as_idempotent, ContextManager,
77
ContextManagerType)

source_py2/test_python_toolbox/test_context_management/test_as_reentrant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def __exit__(self, exc_type, exc_value, exc_traceback):
110110
my_set.add(6)
111111
my_set.add(7)
112112
my_set.add(8)
113-
assert my_set == {0, 1, 2, 3, 4}
113+
assert my_set == set((0, 1, 2, 3, 4))
114114

115115

116116

source_py2/test_python_toolbox/test_math_tools/test_cute_round.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def almost_equals(x, y):
1414

1515
class CuteRoundTestCase(cute_testing.TestCase):
1616
def test_closest_or_down(self):
17-
full_arg_spec = inspect.getfullargspec(cute_round)
18-
assert RoundMode.CLOSEST_OR_DOWN in full_arg_spec.defaults
17+
arg_spec = inspect.getargspec(cute_round)
18+
assert RoundMode.CLOSEST_OR_DOWN in arg_spec.defaults
1919

2020
assert almost_equals(cute_round(7.456), 7)
2121
assert almost_equals(cute_round(7.654), 8)

source_py2/test_python_toolbox/test_temp_file_tools/test_create_temp_folder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ def test_parent_folder():
115115
assert str(tf2).startswith(str(tf1))
116116

117117
def test_chmod():
118-
with create_temp_folder(chmod=0o777) as liberal_temp_folder, \
119-
create_temp_folder(chmod=0o000) as conservative_temp_folder:
118+
with (create_temp_folder(chmod=0o777) as liberal_temp_folder,
119+
create_temp_folder(chmod=0o000) as conservative_temp_folder):
120120
# Doing a very weak test of chmod because not everything is supported
121121
# on Windows.
122122
assert (liberal_temp_folder.stat().st_mode & 0o777) > \

0 commit comments

Comments
 (0)