New submission from STINNER Victor:

Currently, regrtest considers that a test file leaks if at least one run 
increased or decreased the global reference counter. The problem is that in 
practice, Python is full of singletons, caches, and other jokes of the garbage 
collector, etc.

To reduce false alarms and focus more on real bugs, I suggest to change the 
reference difference checker from:

     def check_rc_deltas(deltas):
        return any(deltas)

to:

     def check_rc_deltas(deltas):
        return all(delta>=1 for delta in deltas)

It would allow to ignore false positives like:

* [3, 0, 0]
* [0, 1, 0]
* [8, -8, 1]

----------
components: Tests
messages: 296950
nosy: haypo
priority: normal
severity: normal
status: open
title: regrtest: change -R/--huntrleaks rule to decide if a test leaks
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30776>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to