Skip to content

Commit

Permalink
Test __bytes__ on Python 2, too.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Apr 18, 2019
1 parent d522d16 commit 2b058db
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Acquisition/tests.py
Expand Up @@ -2449,8 +2449,7 @@ class Impl(Implicit):
# By the time it gets there, it's not wrapped:
self.assertIs(type(child.__dict__['child2']), Impl)

@unittest.skipIf(PY2, 'Python 2 has no explicit bytes support')
def test__bytes__is_correcty_wrapped(self): # pragma: PY3
def test__bytes__is_correcty_wrapped(self):
class A(Implicit):

def __bytes__(self):
Expand All @@ -2461,8 +2460,7 @@ def __bytes__(self):
wrapper = Acquisition.ImplicitAcquisitionWrapper(a.b, a)
self.assertEqual(b'my bytes', bytes(wrapper))

@unittest.skipIf(PY2, 'Python 2 has no explicit bytes support')
def test_AttributeError_if_object_has_no__bytes__(self): # pragma: PY3
def test_AttributeError_if_object_has_no__bytes__(self):
class A(Implicit):
pass

Expand Down

0 comments on commit 2b058db

Please sign in to comment.