[ python-Bugs-1345263 ] colorsys tests, bug in frange

SourceForge.net noreply at sourceforge.net
Wed Nov 2 05:25:52 CET 2005


Bugs item #1345263, was opened at 2005-11-01 21:50
Message generated for change (Settings changed) made by titanstar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1345263&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
>Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Rune Holm (titanstar)
Assigned to: Nobody/Anonymous (nobody)
Summary: colorsys tests, bug in frange

Initial Comment:
The frange() function in Lib/test/test_colorsys.py generates incorrect 
ranges, making the tests less comprehensive than expected.
The following patch fixes the problem:

$ svn diff Lib/test/test_colorsys.py
Index: Lib/test/test_colorsys.py
=================================================
==================
--- Lib/test/test_colorsys.py   (revision 41365)
+++ Lib/test/test_colorsys.py   (working copy)
@@ -4,7 +4,7 @@
 def frange(start, stop, step):
     while start <= stop:
         yield start
-        start += stop
+        start += step
 
 class ColorsysTest(unittest.TestCase):
 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1345263&group_id=5470


More information about the Python-bugs-list mailing list