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: Refactor test_threadedtempfile.py to use unittest.
Type: Stage:
Components: Tests Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: collinwinter Nosy List: collinwinter, jerry.seutter
Priority: normal Keywords: patch

Created on 2007-02-28 15:41 by jerry.seutter, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_threadedtempfile.py.patch jerry.seutter, 2007-02-28 15:41 patch v1
test_threadedtempfile.py.patch jerry.seutter, 2007-03-12 05:56 patch v2 - cleanup old style print error
Messages (9)
msg51998 - (view) Author: Jerry Seutter (jerry.seutter) * (Python committer) Date: 2007-02-28 15:41
This patch turns test_threadedtempfile.py into a unittest test file.  There should be no changes in what the file tests.  Input on this patch is welcome before I go too far on more of the old test files.
msg51999 - (view) Author: Jerry Seutter (jerry.seutter) * (Python committer) Date: 2007-02-28 18:40
Lib/test/output/test_threadedtempfile should also be removed when this patch is applied.
msg52000 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-03-06 00:16
Why did you get rid of the -t/-f options?
msg52001 - (view) Author: Jerry Seutter (jerry.seutter) * (Python committer) Date: 2007-03-06 05:07
I removed the -t/-f options mostly because in the short time I spent trying to handle both -t/-f and unittest.main(), it seemed like the options were messing up unittest.  I asked about removing the command line processing on this file at the PyCon sprint and the people there thought it would be okay to remove them.  Their argument was that the files that match output to the output/ directory haven't been refactored in a long time, probably aren't maintained much (other than when they break), and probably aren't used much.  Since the intended audience of this file is a developer, they wouldn't have a difficult time manually changing the global variables for this setting located at the top of the file.

Having said that, if someone uses this functionality, I'll try adding it back in.  Thoughts?
msg52002 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-03-06 17:24
They can stay out; I just wanted to know the reason. This patch looks good to me.
msg52003 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-03-11 17:59
One question before I apply this: why did you leave

if t.error_count:
     print '%s errors:\n%s' % (t.getName(), t.errors.getvalue())

in ThreadedTempFileTest.test_main()? Why not make it some kind of assertion?
msg52004 - (view) Author: Jerry Seutter (jerry.seutter) * (Python committer) Date: 2007-03-12 05:56
File Added: test_threadedtempfile.py.patch
msg52005 - (view) Author: Jerry Seutter (jerry.seutter) * (Python committer) Date: 2007-03-12 05:58
RE:

>One question before I apply this: why did you leave
>
>if t.error_count:
>     print '%s errors:\n%s' % (t.getName(), t.errors.getvalue())


I missed that line - removed it and made the final assert more useful.  See patch v2.
msg52006 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-03-12 17:25
I added an assert for 'ok', committed the result as r54295. Thanks for the patch!
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44635
2007-02-28 15:41:53jerry.seuttercreate