Remove another "no cover"

This commit is contained in:
Jim Paris 2019-08-23 16:41:29 -04:00
parent d907638858
commit 6624e8dab6
2 changed files with 9 additions and 1 deletions

View File

@ -118,7 +118,7 @@ def serializer_proxy(obj_or_type):
try:
# Signal thread to exit, but don't wait for it.
self.__call_queue.put((None, None, None, None))
except: # pragma: no cover
except:
pass
return SerializerObjectProxy(obj_or_type)

View File

@ -112,3 +112,11 @@ class TestSerializer(Base):
i = sp(ListLike)()
eq_(list(i), [1,2,3,4,5])
eq_(i[3], 3)
def test_del(self):
sp = nilmdb.utils.serializer_proxy
foo = sp(Foo("x"))
# trigger exception in __del__, which should be ignored
foo._SerializerObjectProxy__call_queue = None
del foo