@@ -62,24 +62,24 @@ def test_native_str(self):
6262 for s in inputs :
6363 self .assertEqual (native_str (s ), builtin_str (s ))
6464 self .assertTrue (isinstance (native_str (s ), builtin_str ))
65-
66- def test_native (self ):
65+
66+ def test_native (self ):
6767 a = int (10 ** 20 ) # long int
6868 b = native (a )
6969 self .assertEqual (a , b )
7070 if PY2 :
7171 self .assertEqual (type (b ), long )
7272 else :
7373 self .assertEqual (type (b ), int )
74-
74+
7575 c = bytes (b'ABC' )
7676 d = native (c )
7777 self .assertEqual (c , d )
7878 if PY2 :
7979 self .assertEqual (type (d ), type (b'Py2 byte-string' ))
8080 else :
8181 self .assertEqual (type (d ), bytes )
82-
82+
8383 s = str (u'ABC' )
8484 t = native (s )
8585 self .assertEqual (s , t )
@@ -151,7 +151,7 @@ def test_raise_from_None(self):
151151 except ValueError as e :
152152 self .assertTrue (isinstance (e .__context__ , TypeError ))
153153 self .assertIsNone (e .__cause__ )
154-
154+
155155 @skip26
156156 def test_as_native_str (self ):
157157 """
@@ -161,9 +161,9 @@ class MyClass(object):
161161 @as_native_str ()
162162 def __repr__ (self ):
163163 return u'abc'
164-
164+
165165 obj = MyClass ()
166-
166+
167167 self .assertEqual (repr (obj ), 'abc' )
168168 if PY2 :
169169 self .assertEqual (repr (obj ), b'abc' )
@@ -186,6 +186,9 @@ def test_ensure_new_type(self):
186186 self .assertEqual (ensure_new_type (i ), i2 )
187187 self .assertEqual (type (ensure_new_type (i )), int )
188188
189+ l = []
190+ self .assertIs (ensure_new_type (l ), l )
191+
189192 def test_bytes_to_native_str (self ):
190193 """
191194 Test for issue #47
@@ -215,7 +218,7 @@ class DatabaseError(Exception):
215218
216219 # Python 2 and 3:
217220 from future .utils import raise_from
218-
221+
219222 class FileDatabase :
220223 def __init__ (self , filename ):
221224 try :
@@ -228,7 +231,7 @@ def __init__(self, filename):
228231 fd = FileDatabase ('non_existent_file.txt' )
229232 except Exception as e :
230233 assert isinstance (e .__cause__ , IOError ) # FileNotFoundError on
231- # Py3.3+ inherits from IOError
234+ # Py3.3+ inherits from IOError
232235
233236 def testCauseSyntax (self ):
234237 try :
0 commit comments