homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fix for refleak tests
Type: Stage:
Components: Versions: Python 3.0
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: christian.heimes, gvanrossum
Priority: low Keywords: patch

Created on 2007年11月09日 15:17 by christian.heimes, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py3k_reftestfix.patch christian.heimes, 2007年11月09日 15:18
py3k_reftestfix2.patch christian.heimes, 2007年11月09日 19:45
Messages (11)
msg57310 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007年11月09日 15:18
The patch prevents some tests from running multiple times in a test session.
msg57315 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007年11月09日 18:44
Hm, I was hoping more for patches to the C code that would make these
initializations reentrant (e.g. by testing a flag in C that says "I'm
already initialized").
msg57321 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007年11月09日 19:45
Here is a version of test_freeze that doesn't depend on stdout output on
load.
msg57414 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007年11月12日 17:49
Please check in the frozen-related fixes.
Your changes to test_tcl break that test even when run without -R!
For test_pkg, I would rather see a fix that undoes all the changes to
sys.modules (note that it already restores sys.path and deletes the
files it's created, but that's not enough).
msg57419 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007年11月12日 19:14
How do you like;
class TestPkg(unittest.TestCase):
 def setUp(self):
 self.root = None
 self.syspath = list(sys.path)
 self.sysmodules = sys.modules.copy()
 def tearDown(self):
 sys.path[:] = self.syspath
 sys.modules.clear()
 sys.modules.update(self.sysmodules)
 del self.sysmodules
 cleanout(self.root)
Or I could use the paranoid approach: create set from sys.modules.keys()
in setUp + tearDown and remove the items that are in the second set but
not in the first set.
msg57420 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007年11月12日 19:20
Fix for test_frozen comitted in r58953 
msg57422 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007年11月12日 19:47
If that makes the test pass with and without -R::, go for it!
On Nov 12, 2007 11:14 AM, Christian Heimes <report@bugs.python.org> wrote:
>
> Christian Heimes added the comment:
>
> How do you like;
>
> class TestPkg(unittest.TestCase):
>
> def setUp(self):
> self.root = None
> self.syspath = list(sys.path)
> self.sysmodules = sys.modules.copy()
>
> def tearDown(self):
> sys.path[:] = self.syspath
> sys.modules.clear()
> sys.modules.update(self.sysmodules)
> del self.sysmodules
> cleanout(self.root)
>
> Or I could use the paranoid approach: create set from sys.modules.keys()
> in setUp + tearDown and remove the items that are in the second set but
> not in the first set.
>
>
> __________________________________
> Tracker <report@bugs.python.org>
> <http://bugs.python.org/issue1414>
> __________________________________
>
msg57999 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007年11月30日 19:27
ping?
msg58016 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007年11月30日 22:03
I don't know how to fix the problem. You have to assign the bug to
somebody who has experience with Tcl/Tk.
msg58018 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007年11月30日 22:08
Can you open a separate item for the Tkinter leak so you can close this one?
msg58029 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007年11月30日 23:18
The bug report for test_tcl is at http://bugs.python.org/issue1532 
History
Date User Action Args
2022年04月11日 14:56:28adminsetgithub: 45755
2008年01月06日 22:29:45adminsetkeywords: - py3k
versions: Python 3.0
2007年11月30日 23:18:30christian.heimessetstatus: open -> closed
resolution: accepted
messages: + msg58029
2007年11月30日 22:08:51gvanrossumsetmessages: + msg58018
2007年11月30日 22:03:06christian.heimessetmessages: + msg58016
2007年11月30日 19:27:13gvanrossumsetmessages: + msg57999
2007年11月12日 19:47:38gvanrossumsetmessages: + msg57422
2007年11月12日 19:20:25christian.heimessetmessages: + msg57420
2007年11月12日 19:14:35christian.heimessetmessages: + msg57419
2007年11月12日 17:49:59gvanrossumsetmessages: + msg57414
2007年11月09日 19:45:21christian.heimessetfiles: + py3k_reftestfix2.patch
messages: + msg57321
2007年11月09日 18:44:35gvanrossumsetmessages: + msg57315
2007年11月09日 15:18:06christian.heimessetfiles: + py3k_reftestfix.patch
messages: + msg57310
2007年11月09日 15:17:05christian.heimescreate

AltStyle によって変換されたページ (->オリジナル) /