Skip to content

Commit

Permalink
Merge e7284b7 into ebd037f
Browse files Browse the repository at this point in the history
  • Loading branch information
keis committed Nov 30, 2013
2 parents ebd037f + e7284b7 commit 26e8d04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_weak.py
@@ -1,9 +1,11 @@
import gc
from smoke import weak, Disconnect
from tests.matchers import assert_raises
from hamcrest import assert_that, equal_to, instance_of


class Dummy(object):
value = None
def spam(self):
return self.value

Expand All @@ -20,6 +22,7 @@ def test_weak_raises_disconnect():
d = Dummy()
w = weak(d.spam)
del d
gc.collect()

with assert_raises(instance_of(Disconnect)):
r = w()

0 comments on commit 26e8d04

Please sign in to comment.