Hello,

On 2024/09/26 4:40, Stefan Sperling wrote:
> When running swig-py regression tests on the 1.14.x branch,
> I see the following failure:
>
> ...........................................s......................................................................F.............................................
> ======================================================================
> FAIL: test_parse_fns3_apply_textdelta_handler_refcount 
> (repository.SubversionRepositoryTestCase.test_parse_fns3_apply_textdelta_handler_refcount)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/home/stsp/svn/svn-1.14.x/subversion/bindings/swig/python/tests/repository.py",
>  line 359, in test_parse_fns3_apply_textdelta_handler_refcount
>     self.assertEqual(None, handler_ref())
> AssertionError: None != <function SubversionRepositoryTestCase.te[77 
> chars]0c20>
>
> Does anyone know whether this is an expected failure?

This is not an expected failure. The assertion line expects the last
reference to handler shall be cleared by 'del hander' at the line before,
and then handler_ref() shall not return handler object.

> Or how to make the test pass?

However, if weakref for 'handler' object might still remain after
the last strong reference is cleared, this test is incomplete and
it should rewrite to a test based on sys.getrefcount().

Cheers,
-- 
Yasuhito FUTATSUKI <futat...@yf.bsdclub.org>

Reply via email to