cubicweb/test/unittest_binary.py
changeset 12567 26744ad37953
parent 12355 c703dc95c82e
--- a/cubicweb/test/unittest_binary.py	Fri Apr 05 17:21:14 2019 +0200
+++ b/cubicweb/test/unittest_binary.py	Fri Apr 05 17:58:19 2019 +0200
@@ -20,8 +20,6 @@
 import os.path as osp
 import pickle
 
-from six import PY2
-
 from logilab.common.shellutils import tempdir
 
 from cubicweb import Binary
@@ -32,10 +30,7 @@
         Binary()
         Binary(b'toto')
         Binary(bytearray(b'toto'))
-        if PY2:
-            Binary(buffer('toto'))  # noqa: F821
-        else:
-            Binary(memoryview(b'toto'))
+        Binary(memoryview(b'toto'))
         with self.assertRaises((AssertionError, TypeError)):
             # TypeError is raised by BytesIO if python runs with -O
             Binary(u'toto')
@@ -44,10 +39,7 @@
         b = Binary()
         b.write(b'toto')
         b.write(bytearray(b'toto'))
-        if PY2:
-            b.write(buffer('toto'))  # noqa: F821
-        else:
-            b.write(memoryview(b'toto'))
+        b.write(memoryview(b'toto'))
         with self.assertRaises((AssertionError, TypeError)):
             # TypeError is raised by BytesIO if python runs with -O
             b.write(u'toto')