Skip to content

Commit

Permalink
Failing test case for #38 to demonstrate the problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Apr 9, 2019
1 parent e3b5dae commit 2430447
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Acquisition/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2449,6 +2449,17 @@ class Impl(Implicit):
# By the time it gets there, it's not wrapped:
self.assertIs(type(child.__dict__['child2']), Impl)

def test__bytes__is_correcty_wrapped(self):
class A(Implicit):

def __bytes__(self):
return b'my bytes'

a = A()
a.b = A()
wrapper = Acquisition.ImplicitAcquisitionWrapper(a.b, a)
self.assertEqual(b'my bytes', bytes(wrapper))


class TestOf(unittest.TestCase):

Expand Down

0 comments on commit 2430447

Please sign in to comment.