File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22
3+ import sys
34import time
45import unittest
56from threading import Lock , Thread
@@ -154,6 +155,8 @@ def test_threads(self):
154155 self .assert_cached (check , num_threads )
155156 self .assert_cached (check , num_threads )
156157
158+ @unittest .skipUnless (sys .implementation .name == "cpython" ,
159+ "unknow garbage collection mechanism" )
157160 def test_garbage_collection (self ):
158161 Check = CheckFactory (self .cached_property_factory )
159162 check = Check ()
@@ -164,7 +167,7 @@ def test_garbage_collection(self):
164167 # remove the only reference to the Check instance
165168 del check
166169 # make sure the cache of the deleted object was removed
167- self .assertEqual (len ( Check .add_cached .cache ), 0 )
170+ self .assertEqual (Check .add_cached .cache , {} )
168171
169172 def test_object_independent (self ):
170173 Check = CheckFactory (self .cached_property_factory )
You can’t perform that action at this time.
0 commit comments