summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlice Bevan–McGregor <alice@gothcandy.com>2014-11-21 21:35:47 -0500
committerAlice Bevan–McGregor <alice@gothcandy.com>2014-11-21 21:35:47 -0500
commit583470bededa0419bd0984f3fc0191738174a6cd (patch)
tree5ce6fbb4340f8c596197c2f5b7bf738c14418397
parentff1e1bf21c1ac82fc9134e4a31bb0243d170723b (diff)
downloadmarkupsafe-583470bededa0419bd0984f3fc0191738174a6cd.tar.gz
Explicitly trigger GC prior to counting; fixes #39.
-rw-r--r--markupsafe/tests.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/markupsafe/tests.py b/markupsafe/tests.py
index 6369936..94ff030 100644
--- a/markupsafe/tests.py
+++ b/markupsafe/tests.py
@@ -158,6 +158,7 @@ class MarkupLeakTestCase(unittest.TestCase):
escape("<foo>")
escape(u"foo")
escape(u"<foo>")
+ gc.collect()
counts.add(len(gc.get_objects()))
assert len(counts) == 1, 'ouch, c extension seems to leak objects'